summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-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>
2011-08-14ALSA: snd_usb_caiaq: track submitted output urbsDaniel Mack2-4/+28
The snd_usb_caiaq driver currently assumes that output urbs are serviced in time and doesn't track when and whether they are given back by the USB core. That usually works fine, but due to temporary limitations of the XHCI stack, we faced that urbs were submitted more than once with this approach. As it's no good practice to fire and forget urbs anyway, this patch introduces a proper bit mask to track which requests have been submitted and given back. That alone however doesn't make the driver work in case the host controller is broken and doesn't give back urbs at all, and the output stream will stop once all pre-allocated output urbs are consumed. But it does prevent crashes of the controller stack in such cases. See http://bugzilla.kernel.org/show_bug.cgi?id=40702 for more details. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Matej Laitl <matej@laitl.cz> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-12Merge branch 'fix/asoc' into for-linusTakashi Iwai16-17/+524
2011-08-12ASoC: Fix compile warning in wm8750.cTakashi Iwai1-1/+1
sound/soc/codecs/wm8750.c:784:2: warning: missing braces around initializer sound/soc/codecs/wm8750.c:784:2: warning: (near initialization for ‘wm8750_spi_ids[2].name’) It's because struct spi_device_id.name is a char array, not a pointer, while the driver initializes explicitly with 0. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-12ASoC: omap: Update e-mail address of Jarkko NikulaJarkko Nikula6-9/+9
My gmail account got disabled and I'm not going to reopen it. 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-12ASoC: SAMSUNG: Add I2S0 internal dma driverSangbeom Kim3-0/+481
I2S in Exynos4 and S5PC110(S5PV210) has a internal dma. It can be used low power audio mode and 2nd channel transfer. This patch can support idma. [Reapplied after dependencies propagated through in 3.1-rc1. --broonie] Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-11ASoC: Terminate WM8750 SPI device ID tableMark Brown1-0/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
2011-08-11ASoC: Add missing break in WM8994 probeMark Brown1-0/+1
This error would have no effect on current silicon revisions, the fall through case has the same behaviour. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-10ALSA: snd-usb-caiaq: Correct offset fields of outbound iso_frame_descDaniel Mack1-2/+4
This fixes faulty outbount packets in case the inbound packets received from the hardware are fragmented and contain bogus input iso frames. The bug has been there for ages, but for some strange reasons, it was only triggered by newer machines in 64bit mode. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: William Light <wrl@illest.net> Reported-by: Pedro Ribeiro <pedrib@gmail.com> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10ALSA: azt3328 - adjust error handling code to include debugging codeJulia Lawall1-4/+7
snd_azf3328_dbgcallenter is called at the very beginning of the function, so it could be useful to call snd_azf3328_dbgcallleave at all exit points. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10ALSA: hda - Add CONFIG_SND_HDA_POWER_SAVE to stac_vrefout_set()Wang Shaoyan1-0/+2
In commit 45eebda7, it add new function stac_vrefout_set, but it is only used in code between CONFIG_SND_HDA_POWER_SAVE macro, so add the macro to avoid such warning: sound/pci/hda/patch_sigmatel.c:676:12: warning: 'stac_vrefout_set' defined but not used Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10ALSA: usb-audio - Add quirk for BOSS Micro BR-80Kazutomo Yoshii1-0/+34
Signed-off-by: Kazutomo Yoshii <kazutomo.yoshii@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10ASoC: Fix typo in wm8750 spi_idsMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
2011-08-09ASoC: Fix warning in Speyside WM8962Mark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-09ASoC: Fix SPI driver binding for WM8987Mark Brown1-0/+7
As we had no id_table only the driver name would be matched against meaning that WM8987 devices wouldn't be bound. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-09ASoC: Fix binding of WM8750 on JiveMark Brown1-1/+1
The I2C address is misformatted and would never match. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-08-09ASoC: WM8903: Free IRQ on device removalStephen Warren1-0/+5
Without this, request_irq on subsequent device initialization fails, and the codec cannot be used. 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-09ASoC: Tegra: wm8903 machine driver: Allow re-insertion of moduleStephen Warren1-4/+11
Two issues were preventing module snd-soc-tegra-wm8903.ko from being removed and re-inserted: a) The speaker-enable GPIO is hosted by the WM8903 chip. This GPIO must be freed before snd_soc_unregister_card() is called, because that triggers wm8903.c:wm8903_remove(), which calls gpiochip_remove(), which then fails if any of the GPIOs are in use. To solve this, free all GPIOs first, so the code doesn't care where they come from. b) We need to call snd_soc_jack_free_gpios() to match the call to snd_soc_jack_add_gpios() during initialization. Without this, the call to snd_soc_jack_add_gpios() fails during any subsequent modprobe and initialization, since the GPIO and IRQ are already registered. In turn, this causes the headphone state not to be monitored, so the headphone is assumed not to be plugged in, and the audio path to it is never enabled. Signed-off-by: Stephen Warren <swarren@nvidia.com> Cc: stable@kernel.org Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-09ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPSStephen Warren1-2/+7
Not all PCM devices have all sub-streams. Specifically, the SPDIF driver only supports playback and hence has no capture substream. Check whether a substream exists before dereferencing it, when de-allocating DMA buffers in tegra_pcm_deallocate_dma_buffer. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-08-08Merge branch 'fix/asoc' into for-linusTakashi Iwai10-6830/+6770
2011-08-08Merge branch 'fix/kconfig' into for-linusTakashi Iwai40-805/+514
2011-08-08sound: pss - don't use the deprecated function check_regionWang Shaoyan1-2/+4
sound/oss/pss.c: In function 'configure_nonsound_components': sound/oss/pss.c:676: warning: 'check_region' is deprecated (declared at include/linux/ioport.h:201) Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-08ALSA: timer - Add NULL-check for invalid slave timerTakashi Iwai1-0/+3
Just to be sure. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-08ALSA: timer - Fix Oops at closing slave timerTakashi Iwai1-0/+2
A slave-timer instance has no timer reference, and this results in NULL-dereference at stopping the timer, typically called at closing the device. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=40682 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-08Merge branch 'wm8996-rename' of ↵Takashi Iwai183-29919/+28359
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc
2011-08-08ASoC: Acknowledge WM8996 interrupts before acting on themMark Brown1-5/+4
This closes the small race between a status being read in response to an interrupt and clearing the interrupt, meaning that if the status changes between those periods we might not get a reassertion of the interrupt. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-08ASoC: Rename WM8915 to WM8996Mark Brown8-6735/+6735
For marketing reasons the part will be called WM8996. In order to avoid user confusion rename the driver to reflect this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-07ALSA: Fix dependency of CONFIG_SND_TEA575XTakashi Iwai1-5/+5
CONFIG_SND_TEA575X is enabled by RADIO_SF16FMR2, but the latter one is no PCI device. Since tea575x-tuner itself is independent from the board bus type, the config should be moved out of SND_PCI dependency. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-07ALSA: asihpi - use kzalloc()Thomas Meyer1-3/+2
Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/kzalloc-simple.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-06ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3Daniel Mack1-1/+1
Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Renato <naretobh@gmail.com> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-06ALSA: snd-usb: Fix uninitialized variable usageDaniel Mack1-1/+1
Purely cosmetic, but fixes the following build warning. CC [M] sound/usb/quirks.o sound/usb/quirks.c: In function ‘snd_usb_apply_boot_quirk’: sound/usb/quirks.c:429:6: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-05ALSA: hda - Fix a complile warning in patch_via.cWang Shaoyan1-1/+1
sound/pci/hda/patch_via.c:2087: warning: 'dac' may be used uninitialized in this function Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-05ALSA: hdspm - Fix uninitialized compile warningsTakashi Iwai1-6/+13
Put the exception checks for io_type switch() for possible mistakes in future. Also this shuts up annoying compile warnings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-05ALSA: usb-audio - add quirk for Keith McMillen StringPortMiller Puckette1-0/+6
Signed-off-by: Miller Puckette <msp@ucsd.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04ALSA: snd-usb: operate on given mixer interface onlyDaniel Mack2-12/+9
When creating the mixers for an USB audio device, the current code looks at the host interface stored in mixer->chip->ctrl_if. Change this and rather keep a local pointer to the interface that was given when snd_usb_create_mixer() was called. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Nicolai Krakowiak <nicolai.krakowiak@gmail.com> Reported-by: Lean-Yves LENHOF <jean-yves@lenhof.eu.org> Acked-by: Clemens Ladisch <clemens@ladisch.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04ALSA: snd-usb: avoid dividing by zero on invalid inputNicolai Krakowiak1-0/+5
Signed-off-by: Nicolai Krakowiak <nicolai.krakowiak@gmail.com> Acked-by: Daniel Mack <zonque@gmail.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6Clemens Ladisch1-1/+1
The Focusrite Scarlett 18i6 USB has them that way, which is probably a bug. Anyway, the driver should simply ignore this fact. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Nicolai Krakowiak <nicolai.krakowiak@gmail.com> Cc: stable@kernel.org Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04sound: oss/pas2: Remove CLOCK_TICK_RATE dependency from PAS16 driverDeepak Saxena1-4/+4
Update the PAS16 driver to use PIT_TICK_RATE instead of the more generic CLOCK_TICK_RATE as the two are equivalent on X86 and we want to depecrate the later. Signed-off-by: Deepak Saxena <dsaxena@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04ALSA: hda - Use auto-parser for ASUS UX50, Eee PC P901, S101 and P1005Takashi Iwai1-7/+0
It works fine with auto-parser and now the digital mic workaround was implemented in auto-parser fixup, let's drop the static model quirks for these models. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04ALSA: hda - Fix digital-mic mono recording on ASUS Eee PCTakashi Iwai1-0/+26
The digital-mic unit on ASUS Eee PC gives PDM signals instead of the normal stereo PCM, thus you can't record a mono stream from the stereo stream as is; the summed stereo signal results in almost zero level, and you'll hear only soft noise. As a workaround, use ALC269-specific COEF to manipulate the dmic route for mono, like used for ALC271x. This is implemented as a fix-up, thus it works only with model=auto or without REALTEK_QUIRKS Kconfig. Reported-and-tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-03Merge branch 'for-linus' of ↵Linus Torvalds6-14/+128
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: asihpi - Clarify adapter index validity check ALSA: asihpi - Don't leak firmware if mem alloc fails ALSA: rtctimer.c needs module.h ASoC: Fix txx9aclc.c build ALSA: hdspm - Add firmware revision 0xcc for RME MADI ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIface ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIface ALSA: sound/core/pcm_compat.c: adjust array index
2011-08-03ASoC: sgtl5000: fix cache handlingWolfram Sang1-93/+35
Cache handling in this driver is broken. The chip has 16-bit registers, yet the register numbers also increase by 2 per register, i.e. there are only even-numbered registers. The cache in this driver, though, simply increments register numbers, so it does need some mapping as seen in sgtl5000_restore_regs(), note the '>> 1': snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL, cache[SGTL5000_CHIP_LINREG_CTRL >> 1]); That, of course, won't work with snd_soc_update_bits(). (Thus, we won't even notice the missing register 0x1c in the default regs which shifted all follwing registers to wrong values.) Noticed on the MX28EVK where enabling the regulators simply locked up the chip. Refactor the routines and use a properly sized default_regs array which matches the register layout of the underlying chip, i.e. create a truly flat cache. This also saves some code which should make up for the bigger array a little. When soc-core will somewhen have another cache type which handles a step size, this conversion will also ease the transition. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Dong Aisheng <b29396@freescale.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-08-02Merge branch 'fix/asoc' into for-linusTakashi Iwai1-0/+1
2011-08-02ALSA: asihpi - Clarify adapter index validity checkEliot Blennerhassett1-7/+12
Avoids assigning possibly invalid address to pa, even if it is never dereferenced. Correct error response to reflect request object/function ids. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>