summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2011-04-15Merge branch 'linux-linaro-2.6.38-master' into for-ubuntuu2Andy Green
2011-04-14Merge commit 'v2.6.38.3' into linaro-2.6.38Nicolas Pitre
2011-04-14sound/oss: remove offset from load_patch callbacksDan Rosenberg
commit b769f49463711205d57286e64cf535ed4daf59e9 upstream. Was: [PATCH] sound/oss/midi_synth: prevent underflow, use of uninitialized value, and signedness issue The offset passed to midi_synth_load_patch() can be essentially arbitrary. If it's greater than the header length, this will result in a copy_from_user(dst, src, negative_val). While this will just return -EFAULT on x86, on other architectures this may cause memory corruption. Additionally, the length field of the sysex_info structure may not be initialized prior to its use. Finally, a signed comparison may result in an unintentionally large loop. On suggestion by Takashi Iwai, version two removes the offset argument from the load_patch callbacks entirely, which also resolves similar issues in opl3. Compile tested only. v3 adjusts comments and hopefully gets copy offsets right. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)David Henningsson
commit 262ac22d21ee2bf3e1655b2e5e45cc94b356e62f upstream. In cases where there is only one internal mic connected to ADC 0x11, alc275_setup_dual_adc won't handle the case, so we need to add the ADC node to the array of candidates. BugLink: http://bugs.launchpad.net/bugs/752792 Reported-by: Vincenzo Pii Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: hda - HDMI: Fix MCP7x audio infoframe checksumsAaron Plattner
commit 1f348522844bb1f6e7b10d50b9e8aa89a2511b09 upstream. The MCP7x hardware computes the audio infoframe channel count automatically, but requires the audio driver to set the audio infoframe checksum manually via the Nv_VERB_SET_Info_Frame_Checksum control verb. When audio starts playing, nvhdmi_8ch_7x_pcm_prepare sets the checksum to (0x71 - chan - chanmask). For example, for 2ch audio, chan == 1 and chanmask == 0 so the checksum is set to 0x70. When audio playback finishes and the device is closed, nvhdmi_8ch_7x_pcm_close resets the channel formats, causing the channel count to revert to 8ch. Since the checksum is not reset, the hardware starts generating audio infoframes with invalid checksums. This causes some displays to blank the video. Fix this by updating the checksum and channel mask when the device is closed and also when it is first initialized. In addition, make sure that the channel mask is appropriate for an 8ch infoframe by setting it to 0x13 (FL FR LFE FC RL RR RLC RRC). Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: HDA: Fix dock mic for Lenovo X220-tabletDavid Henningsson
commit b2cb1292b1c7c73abbdc0e07ef3aab056fc2615f upstream. Without the "thinkpad" quirk, the dock mic in Lenovo X220 tablet edition won't work. BugLink: http://bugs.launchpad.net/bugs/751033 Tested-by: James Ferguson <james.ferguson@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: HDA: Add dock mic quirk for Lenovo Thinkpad X220David Henningsson
commit 840126579da56edae8ecc4a0d85198f742982f10 upstream. This quirk is needed for the docking station mic of Lenovo Thinkpad X220 to function correctly. BugLink: http://bugs.launchpad.net/bugs/746259 Tested-by: James Ferguson <james.ferguson@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: pcm: fix infinite loop in snd_pcm_update_hw_ptr0()Kelly Anderson
commit 12ff414e2e4512f59fe191dc18e856e2939a1c79 upstream. When period interrupts are disabled, snd_pcm_update_hw_ptr0() compares the current time against the time estimated for the current hardware pointer to detect xruns. The somewhat fuzzy threshold in the while loop makes it possible that hdelta becomes negative; the comparison being done with unsigned types then makes the loop go through the entire 263 negative range, and, depending on the value, never reach an unsigned value that is small enough to stop the loop. Doing this with interrupts disabled results in the machine locking up. To prevent this, ensure that the loop condition uses signed types for both operands so that the comparison is correctly done. Many thanks to Kelly Anderson for debugging this. Reported-by: Nix <nix@esperi.org.uk> Reported-by: "Christopher K." <c.krooss@googlemail.com> Reported-and-tested-by: Kelly Anderson <kelly@silka.with-linux.com> Signed-off-by: Kelly Anderson <kelly@silka.with-linux.com> [cl: remove unneeded casts; use a temp variable] Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: ens1371: fix Creative Ectiva supportClemens Ladisch
commit 6ebb8a4a43e34f999ab36f27f972f3cd751cda4f upstream. To make the EV1938 chip work, add a magic bit and an extra delay. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Tino Schmidt <mailtinoshomepage@gmx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ASoC: Fix CODEC device name for CorgiMark Brown
commit 326b9bdc2a0e4d556a0f444085dca103bcd505de upstream. Got typoed in the multi-component changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ASoC: imx: fix burstsize for DMAWolfram Sang
commit e1bb31b444668bc957c337d33803db7cb3330745 upstream. SSI counts in words, the DMA engine in bytes. (Wrong) factor got removed in bf974a0 (ASoC i.MX: switch to new DMA api). Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ASoC: imx: set watermarks for mx2-dmaWolfram Sang
commit 2c4cf17a52f04fbe929977252d5b8ab81d2c6e9b upstream. They got accidently removed by f0fba2a (ASoC: multi-component - ASoC Multi-Component Support). Reintroduce them and get rid of the superfluous defines because the fiq-driver has its own hardcoded values. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14sound/oss/opl3: validate voice and channel indexesDan Rosenberg
commit 4d00135a680727f6c3be78f8befaac009030e4df upstream. User-controllable indexes for voice and channel values may cause reading and writing beyond the bounds of their respective arrays, leading to potentially exploitable memory corruption. Validate these indexes. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: vmalloc buffers should use normal mmapBenjamin Herrenschmidt
commit 3674f19dabd15f9541079a588149a370d888f4e6 upstream. It's a big no-no to use pgprot_noncached() when mmap'ing such buffers into userspace since they are mapped cachable in kernel space. This can cause all sort of interesting things ranging from to garbled sound to lockups on various architectures. I've observed that usb-audio is broken on powerpc 4xx for example because of that. Also remove the now unused snd_pcm_lib_mmap_noncached(). It's an arch business to know when to use uncached mappings, there's already hacks for MIPS inside snd_pcm_default_mmap() and other archs are supposed to use dma_mmap_coherent(). (See my separate patch that adds dma_mmap_coherent() to powerpc) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: Fix yet another race in disconnectionTakashi Iwai
commit a45e3d6b13e97506b616980c0f122c3389bcefa4 upstream. This patch fixes a race between snd_card_file_remove() and snd_card_disconnect(). When the card is added to shutdown_files list in snd_card_disconnect(), but it's freed in snd_card_file_remove() at the same time, the shutdown_files list gets corrupted. The list member must be freed in snd_card_file_remove() as well. Reported-and-tested-by: Russ Dill <russ.dill@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: hda - Fix SPDIF out regression on ALC889Takashi Iwai
commit 20b67dddcc5f29d3d0c900225d85e0ac655bc69d upstream. The commit 5a8cfb4e8ae317d283f84122ed20faa069c5e0c4 ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization changed to use the default initialization method for ALC889, but this caused a regression on SPDIF output on some machines. This seems due to the COEF setup included in the default init procedure. For making SPDIF working again, the COEF-setup has to be avoided for the id 0889. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=24342 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14ALSA: HDA: New AD1984A model for Dell Precision R5500David Henningsson
commit 677cd904aba939bc4cfdc3c1eada8ec46582127e upstream. For codec AD1984A, add a new model to support Dell Precision R5500 or the microphone jack won't work correctly. BugLink: http://bugs.launchpad.net/bugs/741516 Tested-by: Kent Baxley <kent.baxley@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13alsa panda hdmi audio ensure cpu dai gets builtAndy Green
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-04-13alsa soc implement abe constraint testAndy Green
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-04-13omap2 sdp4430 protect hdmi with hdmi sound configAndy Green
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-04-07ASoC: OMAP: Relocate BUFFER_BYTES constraint to ABERicardo Neri
The constraint in BUFFER_BYTES in omap-pcm is moved to omap-abe. This constraint was put in omap-pcm to cater the DMA boundaries of omap-hdmi and omap-abe DAIs. Now, each DAI handles their own constraints separately. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP: Add platform_device ID to SDP4430 machine driverRicardo Neri
Utilize a platform_device ID when creating the device. This is to allow to other SDP and Panda machine drivers to connect to soc-audio. New machine drivers must use different platform_device IDs if they need to coexist with existing ASoC machine drivers. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP4: Remove HDMI CPU DAI from SDP4430 machine driverRicardo Neri
Remove HDMI CPU DAI from SDP4430 machine driver. A different machine driver is use for HDMI audio. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP: Update Makefile and Kconfig for HDMI audioRicardo Neri
Update Makefile and Kconfig to build HDMI audio support for OMAP4 SDP and Panda boards. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP4: Add Machine driver for HDMI for SDP and PandaRicardo Neri
Add machine driver for HDMI on OMAP4 for SDP and Panda boards. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP: Add header for HDMI CPU DAIRicardo Neri
Add header with definitions for the ASoC HDMI CPU DAI. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP4: Remove old HDMI CPU DAI headerRicardo Neri
Remove old HDMI CPU DAI header. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP: Add CPU DAI driver for HDMIRicardo Neri
Addition of the HDMI CPU DAI driver for OMAP4. This driver is in charge of configuring DMA settings for HDMI. Also, it finds the HDMI video device and determines if audio playback can proceed. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASoC: OMAP4: Remove old HDMI DAI implementationRicardo Neri
Remove old HDI-DAI implementation. This driver will be updated. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2011-04-07ASOC OMAP disable omap4 hdmi from config as not workingAndy Green
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-04-07Re: Panda mixer "AUX FM" mappingLiam Girdwood
Hi Andy, On Mon, 2011-03-28 at 15:43 +0100, Andy Green wrote: > Hi - > > Just a little issue I noticed, the operation of "Aux FM" slider in the > current alsa stuff is a bit broken in terms of its mapping to the > effective attenuation that happens. > > Starting at 0 everything is quiet, but as we go up it increases and > decreases the volume in left and right individually. It's like it has > the idea the attenuator is a single mono one where actually it's two > smaller stereo ones. > > Also, Panda FM reception seems to work but with a headset lead as > antenna, it's not what I would call reasonable signal quality. Is that > anyone else's experience too? > > -Andy I've just had a very quick check against the TRM and have attached an untested patch (as my Panda is broken). Could you give this a try. Liam commit 3981b720b800bda16028f36ab10d2c9ec7e7c6c7 Author: Liam Girdwood <lrg@slimlogic.co.uk> Date: Mon Mar 28 19:23:23 2011 +0100 ASoC: twl6040 - fix LINEGAIN volume control Fix the TWL6040 LINEGAIN volume control to match the TRM. Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-04-07ASoC: OMAP4: Add buffer size contrainst for ABE and HDMIMisael Lopez Cruz
ABE needs a step size of 24 * 4, whilst HDMI requires a step size of 32 * 4 bits. These constraints are only applicable for OMAP4. Change-Id: I338f207816ef6c165ffb06dc8c346b29969ef4ee Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com> Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: twl6040: enable default sysclk constraintsLiam Girdwood
If sysclk contrainst are not set by the machine driver then we will register NULL constraints at PCM startup. Fix this by making setting default constraints at probe() Change-Id: I5630dd5d72095cb8eef1fa3d1d3e275c6b87111d Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-04-07ALSA: pcm: reject calls to open backend PCMsLiam Girdwood
This stops userspace opening backend PCMs. Change-Id: Ide3df013f158a4ad49da2bfcacb91aa8f3b6970b Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-04-07ASoC: DMIC: Remove explicit bias setting for DMicsMisael Lopez Cruz
Digital microphone bias is now supplied through SoC DAPM, it's not required anymore to explicitly enable/disable bias in DMIC PCM ops. Change-Id: If6681ea7b1830ea95f68f23ec52220944821f4b5 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: sdp4430: Add Mic Bias for DMic0, DMic1 and DMic2Misael Lopez Cruz
Blaze/SDP4430 contains DMic0, DMic1 and DMic2 interfaces, which are supplied by Digital Mic Bias 1 from TWL6040. An alternate second digital microphone bias could be used from Digital Mic Bias 2, but it's currently not installed in application board. Change-Id: Icdbe25fffa627e373866de64c38dac4619622c5e Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: twl6040: Add digital mic bias voltageMisael Lopez Cruz
Add a control to select output voltage (1.80 or 1.85V) of Digital Mic Bias 1 and 2. Change-Id: I7d76df5c8678fbcff4280bcf9ae87f9c859952f3 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: SDP4430: Set the pmdown_time for OMAP_ABE_BE_PDM_DL2Axel Castaneda Gonzalez
For HF playback stream pmdown_time was not set to 500ms, 5000ms was used as a default delay, which was causing pops at the end of audio rendering because playback streams were powered down after McPDM shutdown. Change-Id: I1a8ca45229898ef1c1c9d6f04f3c985e790bbfb8 Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
2011-04-07ASoC: McPDM: Avoid multiple irq request/freeMisael Lopez Cruz
McPDM irq request and free was associated to mcpdm_request and mcpdm_free APIs, which are called when audio stream is opened and closed, respectively. These multiple calls are unnecessary as irq can be requested when driver is probed and released during driver removal. Change-Id: I3afcae888eb0baffd8a3f85878e30b61c70c73c8 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: McPDM: Fix race condition in playback stream shutdownMisael Lopez Cruz
In order to safely free McPDM interface during playback stream shutdown, it's also required to check that no new playback streams have been opened since the time the delayed shutdown work was scheduled and the time it got executed. Otherwise, McPDM interface could get freed between stream startup and hw_params calls, which could end up crashing the system. Change-Id: I50d5ce897b5f4684a7afe3723eb1dd90de65dacd Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: twl6040: Update sysclk in hw_paramsMisael Lopez Cruz
TWL6040 sysclk can be changed during hw_params() call depending on the requested sample rate, which requires private sysclk value to be updated as well. Change-Id: I26cd8c6314b64946f073012c17455d4cfc9efafb Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: twl6040: Configure ramp step based on platformAxel Castaneda Gonzalez
Enable ramp down/up step to be configured based on platform. Change-Id: I4e5aff8b9b6ab477919e5f98af71e77dfd370e92 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
2011-04-07ASoC: Fix DAPM codec initSebastien Jan
For OMAP4, a widget is used without a codec associated, so accessing the codec would generate a hang. This may be a temporary hack. Final solution is discussed upstream. Signed-off-by: Sebastien Jan <s-jan@ti.com> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
2011-04-07alsa soc add exports from hwmod and othersAndy Green
This patch allows building of the SoC SDP4430 stuff as modules Signed-off-by: Andy Green <andy.green@linaro.org>
2011-04-07ASoC: ABE: Select dynamic minor numbers for ABELiam Girdwood
Select dynamic minor numbers for ABE to allow registration of all ABE PCMs. Change-Id: I0c14a81ca64f27d4208a3bf2f77062bc06977350 Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: ABE DSP: Fix dma_area for ping-pong bufferSebastien Guiriec
ALSA runtime dma_area had an incorrect additional offset for ping-pong buffer. Some of the addresses defined in ABE DSP driver which were already defined in ABE HAL are also removed. Change-Id: Ib6e954dbb486d937cd0a67015a110cb3eba9d153 Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: McPDM: Balance pm_runtime counter for invalid streamMisael Lopez Cruz
When playback stream is not started (e.g. parameters not supported, file doesn't exist, etc), pm_runtime resource is never acquired as hw_params for McPDM never gets executed. In that scenario, during stream shutdown pm_runtime resource should not be released otherwise it unbalances usage counter. Change-Id: I2da9931f5e5adf3656218de3baabb9c4a1982382 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: ABE DSP: Use public API to add subroutineMisael Lopez Cruz
ABE HAL public API to add a subroutine is 'abe_plug_subroutine', 'abe_add_subroutine' was used previously, but it's restricted for internal ABE HAL usage. Change-Id: Idfb8448431a7e33450eae070d43544d27e3719d2 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2011-04-07ASoC: McPDM: ioremap McPDM memory to allow module compilationMisael Lopez Cruz
omap_hwmod_get_mpu_rt_va cannot be used if the driver is compiled as a module, McPDM memory is ioremap'ed explicitly instead. Change-Id: Idd05c536a80eae7223d27cccc2b925fda4a22dc1 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
2011-04-07ASoC: ABE DSP: ioremap ABE memory to allow module compilationMisael Lopez Cruz
omap_hwmod_get_mpu_rt_va cannot be used if the driver is compiled as a module, ABE memory is ioremap'ed explicitly instead. Change-Id: Idd05c536a80eae7223d27cccc2b925fda4a22dc1 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>