aboutsummaryrefslogtreecommitdiffstats
path: root/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-09-20ALSA: HDA: Add support for IDT 92HD93David Henningsson1-0/+1
Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/854468 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-19ALSA: hda/realtek - Fix auto-mute with HP+LO configurationTakashi Iwai1-4/+5
When the system has only the headphone and the line-out jacks without speakers, the current auto-mute code doesn't work. It's because the spec->automute_lines flag is wrongly referred in update_speakers(). This flag must be meaningless when spec->automute_hp_lo isn't set, thus they should be always coupled. The patch fixes the problem and add a comment to indicate the relationship briefly. BugLink: http://bugs.launchpad.net/bugs/851697 Reported-by: David Henningsson <david.henningsson@canonical.com> Tested-By: Jayne Han <jayne.han@canonical.com> Cc: stable@kernel.org (3.0) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-15ALSA: pcm - fix race condition in wait_for_avail()Arjan van de Ven1-9/+24
wait_for_avail() in pcm_lib.c has a race in it (observed in practice by an Intel validation group). The function is supposed to return once space in the buffer has become available, or if some timeout happens. The entity that creates space (irq handler of sound driver and some such) will do a wake up on a waitqueue that this function registers for. However there are two races in the existing code 1) If space became available between the caller noticing there was no space and this function actually sleeping, the wakeup is missed and the timeout condition will happen instead 2) If a wakeup happened but not sufficient space became available, the code will loop again and wait for more space. However, if the second wake comes in prior to hitting the schedule_timeout_interruptible(), it will be missed, and potentially you'll wait out until the timeout happens. The fix consists of using more careful setting of the current state (so that if a wakeup happens in the main loop window, the schedule_timeout() falls through) and by checking for available space prior to going into the schedule_timeout() loop, but after being on the waitqueue and having the state set to interruptible. [tiwai: the following changes have been added to Arjan's original patch: - merged akpm's fix for waitqueue adding order into a single patch - reduction of duplicated code of avail check ] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14Merge branch 'fix/asoc' into for-linusTakashi Iwai8-17/+16
2011-09-14ALSA: HDA: Cirrus - fix "Surround Speaker" volume control nameDavid Henningsson1-1/+1
This patch fixes "Surround Speaker Playback Volume" being cut off. (Commit b4dabfc452a10 was probably meant to fix this, but it fixed only the "Switch" name, not the "Volume" name.) Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-13ALSA: hda - Terminate the recursive connection search properlyTakashi Iwai1-1/+5
The recursive search of widget connections in snd_hda_get_conn_index() must be terminated at the pin and the audio-out widgets. Otherwise you'll get "too deep connection" warnings unnecessarily. Reported-by: Francis Moreau <francis.moro@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12ASoC: Fix trivial build regression in Kirkwood I2SArnd Bergmann1-1/+1
A fix merged in 3.1-rc2 introduced a small regression, this should get it to build again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-05ASoC: Blackfin: bf5xx-ad193x: Fix codec device nameLars-Peter Clausen1-2/+2
Fix the codec_name field of the dai_link to match the actual device name of the codec. Otherwise the card won't be instantiated. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-09-05ASoC: Fix reporting of partial jack updatesMark Brown1-1/+1
We need to report the entire jack state to the core jack code, not just the bits that were being updated by the caller, otherwise the status reported by other detection methods will be omitted from the state seen by userspace. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-08-31ASoC: imx: Fix build warning of unused 'card' variableFabio Estevam1-1/+0
Fixes the following warning: CC sound/soc/imx/imx-pcm-fiq.o sound/soc/imx/imx-pcm-fiq.c: In function 'imx_pcm_fiq_new': sound/soc/imx/imx-pcm-fiq.c:243: warning: unused variable 'card' CC sound/soc/imx/imx-pcm-dma-mx2.o Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: Fix register cache sync register_writable WARN_ONsLars-Peter Clausen1-6/+6
Currently the condition for these WARN_ONs is reversed and they are placed before the actual check whether we are going to write to that register. So if the codec implements the register_writable callback we'll get a warning for each writable register when syncing the register cache. While we are at it change the check to use snd_soc_codec_writable_register instead of open-coding it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: snd_soc_codec_{readable,writable}_register change default to trueLars-Peter Clausen1-2/+2
Change the default return value of snd_soc_codec_{readable,writable}_register to true when no codec specific callback for this function is given. Otherwise all registers of that codec will neither be readable nor writable, which is most certainly not what we want. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: soc-dapm: Fix parameter comment for snd_soc_dapm_freePeter Ujfalusi1-1/+1
We have dapm_context instead of codec parameter. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-26Merge branch 'fix/asoc' into for-linusTakashi Iwai21-45/+94
2011-08-25ALSA: hda: Conexant: Allow different output types to share DACDavid Henningsson1-19/+27
Headphones has stopped working for the original reported (a regression compared to 2.6.38). This is because Speaker and Headphones share the same DAC, in which case no Headphones volume control was created. This patch fixes so that both Speaker and Headphones volume controls are created in such scenario. BugLink: http://bugs.launchpad.net/bugs/817943 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24ASoC: MPC5200: replace of_device with platform_deviceTimur Tabi1-3/+3
'struct of_device' no longer exists, and its functionality has been merged into platform_device. Update the MPC5200 audio DMA driver (mpc5200_dma) accordingly. This fixes a build break. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-08-24ASoC: Correct element count for WM8996 sidetone HPFMark Brown1-1/+1
I can count. Honest. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-24ASoC: Tegra: wm8903 machine driver: Drop Ventana supportStephen Warren1-2/+2
Board file support for Ventana is not yet mainlined, and probably won't ever be given the move to Device-Tree. Consequently, the Ventana entry is being removed from arch/arm/tools/mach-types in the next merge window, since it was registered over a year ago. This will also remove function machine_is_ventana(), which is used by the ASoC Tegra WM8903 machine driver. This will cause compilation failures. Drop Ventana support to resolve this. Hopefully, in the not-too-distant future, tegra_wm8903.c will be able to configure itself from Device-Tree, and hence we'll be able to re-instate Ventana support just by creating a .dts file for the board. Also note that Aebl support is in a similar boat. However, that board isn't scheduled for deprecation for at least another 5 months, and perhaps we will have completely removed non-Device-Tree support from tegra_wm8903.c by then and/or adjusted mach-types policy. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24ASoC: Add Springbank I/O card to Speyside KconfigJoseph Pentland1-0/+1
Signed-off-by: Joseph Pentland <jp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24ALSA: hda/conexant - Enable ADC-switching for auto-mic mode, tooTakashi Iwai1-1/+1
The ADC-switching can work also in the auto-mic mode, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23ALSA: hda - Fix double-headphone/speaker paths for Cxt auto-parserTakashi Iwai1-3/+10
When multiple headphones or speakers are assigned but no individual DACs are available, the driver should take the first HP/SPK DAC instead of another primary output. The patch adds a bit-flag to dac field of struct pin_dac_pair indicating that it's a slave DAC. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23ALSA: hda - Update jack-sense info even when no automute is setTakashi Iwai1-4/+4
The internal states, jack_present and line_jack_present should be updated upon unsolicited events even if no automute is set. Otherwise the wrong state is referred when the automute behavior is changed by the mixer control. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23ALSA: hda - Fix output-path initialization for Realtek auto-parserTakashi Iwai1-7/+13
When the headphone or speaker output has no own DAC, initialize the path using the primary DAC. Otherwise the path won't be set properly and can result in the silence. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-22sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_putJulia Lawall1-9/+9
The first change is to add an of_node_put, since codec_np has previously been allocated. The rest of the patch reorganizes the error handling code so the only code executed is that which is needed. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (...) { ... when != of_node_put(x) when != x = E3 when != E3 = x * return ...; } ... when != x = E2 when != I(...,x,...) S if (...) { ... when != x = E4 of_node_put(x); ... return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22sound/soc/fsl/p1022_ds.c: add missing of_node_putJulia Lawall1-1/+3
dma_channel_np has been accessed at this point, so decrease its reference count before leaving the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (...) { ... when != of_node_put(x) when != x = E3 when != E3 = x * return ...; } ... when != x = E2 when != I(...,x,...) S if (...) { ... when != x = E4 of_node_put(x); ... return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22sound/soc/ep93xx/ep93xx-i2s.c: add missing kfreeJulia Lawall1-2/+3
Introduce a new label that includes kfree and jump to that one. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (...) { ... when != kfree(x) when != x = E3 when != E3 = x * return ...; } ... when != x = E2 when != I(...,x,...) S if (...) { ... when != x = E4 kfree(x); ... return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Alexander Sverdlin <subaparts@yandex.ru> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22sound/soc/kirkwood/kirkwood-i2s.c: add missing kfreeJulia Lawall1-1/+1
Adjust the goto to jump to the error handling code that includes kfree. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (...) { ... when != kfree(x) when != x = E3 when != E3 = x * return ...; } ... when != x = E2 when != I(...,x,...) S if (...) { ... when != x = E4 kfree(x); ... return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22ASoC: soc-core: use GFP_KERNEL flag for kmalloc in snd_soc_cnewAxel Lin1-1/+1
GFP_ATOMIC is not needed here, use GFP_KERNEL instead. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22sound/soc/fsl/fsl_dma.c: add missing of_node_putTimur Tabi1-0/+2
of_parse_phandle increments the reference count of np, so this should be decremented before trying the next possibility. Since we don't actually use np, we can decrement the reference count immediately. Reported-by: Julia Lawall <julia@diku.dk> Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22ASoC: Clear completions from late WM8996 FLL lock IRQsMark Brown1-0/+3
In case we have a pending completion, for example due to a problem with the input clock which got corrected after we timed out. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: Clear any outstanding WM8962 FLL lock completions before waitingMark Brown1-0/+4
Ensure that we don't spuriously trigger early. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: Ensure we only run Speyside WM8962 bias level callbacks onceMark Brown1-0/+6
We get called once per DAPM context but only need to run once. When DAPM was serialized this was a series of noops but now it can run in parallel we need to take proper care. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: Fix configuration of WM8996 input enablesMark Brown1-9/+4
There's no need for separate widgets for the enables (as the map already shows). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: WM8996 record paths need AIFCLKMark Brown1-0/+10
Make AIFCLK supply the record paths otherwise record will not work unless there is a simultaneous playback. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-20ALSA: sound/aoa/fabrics/layout.c: remove unneeded kfreeJulia Lawall1-1/+1
The label outnodev is only used when kzalloc has not yet taken place or has failed, so there is no need for the call for kfree under this label. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (...) { ... when != kfree(x) when != x = E3 when != E3 = x * return ...; } ... when != x = E2 when != I(...,x,...) S if (...) { ... when != x = E4 kfree(x); ... return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-20ALSA: hda - Fix error check from snd_hda_get_conn_index() in patch_cirrus.cTakashi Iwai1-3/+5
snd_hda_get_conn_index() returns a negative value while the current code stores it in an unsigned int. It must be stored in a signed integer. Reported-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-20ALSA: hda - Don't spew too many ELD errorsTakashi Iwai1-12/+19
Currently HD-audio driver shows the all error ELD byte as an error in the kernel message. This is annoying when the video driver doesn't set the correct ELD from the beginning. e.g. radeon sends a zero-byte data, but we still check ELD with the fixed 128 byte as a workaround for some broken devices, it spews 128-times errors. For avoiding this, the driver aborts reading when the first byte is invalid. In such a case, the whole data is certainly invalid. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-19ALSA: usb-audio - Fix missing mixer dB informationTakashi Iwai1-1/+2
The recent fix for testing dB range at the mixer creation time seems to cause regressions in some devices. In such devices, reading the dB info at probing time gives an error, thus both dBmin and dBmax are still zero, and TLV flag isn't set although the later read of dB info succeeds. This patch adds a workaround for such a case by assuming that the later read will succeed. In future, a similar test should be performed in a case where a wrong dB range is seen even in the later read. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
2011-08-19ASoC: omap: Fix build errors in ams-deltaJarkko Nikula1-2/+4
Fix "error: too few arguments to function 'ams_delta_set_bias_level'" build errors in ams-delta.c that were introduced after commit d4c6005 ("ASoC: Add context parameter to card DAPM callbacks") by adding dapm context to ams_delta_set_bias_level calls. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-18ALSA: hda - Add "PCM" volume to vmaster slave listTakashi Iwai1-0/+2
The new parser may use "PCM" volume, but it was missing the vmaster slave list, thus "Master" volume didn't control it. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=41342 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-17ASoC: Fix check for symmetric rate enforcementSascha Hauer1-0/+3
The ASoC core tries to not enforce symmetric rates when two streams open simultaneously. It does so by checking rtd->rate being zero. This works exactly once after booting because it is not set to zero again when the streams close. Fix this by setting rtd->rate when no active stream is left. [This leads to lots of warnings about not enforcing the symmetry in some situations as there's a race in the userspace API where we know we've got two applications but don't know what rates they want to set. -- broonie ] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-16ALSA: hda - Fix duplicated capture-volume creation for ALC268 modelsTakashi Iwai1-18/+18
Fix the duplicated creation of capture-mixer elements for some static ALC268 configurations. The capture mixers must be put to cap_mixer field instead of mixers array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ASoC: ad193x: remove cache supportScott Jiang1-8/+0
asoc cache layer can't support this kind of spi registers well. remove cache support and read/write registers directly Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: Add spi hw read function for 16 addr 8 data mode for ad193x fixScott Jiang1-0/+23
[This will be used by the ad193x driver to fix the fact that the original author of the driver put a bodge for their particular chip into a the generic ASoC register I/O abstraction layer which looked like an obvious bug which ended up getting fixed in 3.0. Sadly there were no comments documenting what was going on. A minimally invasive correction to the driver is to remove the register cache support and go direct to the hardware all the time so we're adding a new feature -- broonie] Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: ad193x: fix system clockScott Jiang1-1/+1
system clock is 24.576MHz instead of 12.288MHz Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: ad193x: fix dac word len settingScott Jiang2-1/+3
dac word len value should left shift before setting Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Acked-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-08-15ASoC: ad193x: fix registers definitionScott Jiang1-2/+2
fix dac word len mask and adc tdm fmt shift value Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-08-15ASoC: sta32x: Fix a memory leak if snd_soc_register_codec failsAxel Lin1-0/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: soc-jack: Fix checking return value of request_any_context_irqAxel Lin1-1/+1
request_any_context_irq() returns a negative value on failure. On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.orG
2011-08-15ALSA: ac97: Add HP Compaq dc5100 SFF(PT003AW) to Headphone Jack Sense whitelistDaniel T Chen1-0/+1
BugLink: https://bugs.launchpad.net/bugs/826081 The original reporter needs 'Headphone Jack Sense' enabled to have audible audio, so add his PCI SSID to the whitelist. Reported-and-tested-by: Muhammad Khurram Khan Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>