summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2012-01-25Merge branch 'fix/asoc' of ↵Linus Torvalds8-83/+96
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: wm2000: Fix use-after-free - don't release_firmware() twice on error ASoC: wm8958: Use correct format string in dev_err() call ASoC: wm8996: Call _POST_PMU callback for CPVDD ASoC: mxs: Fix mxs-saif timeout ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK ASoC: Don't go through cache when applying WM5100 rev A updates ASoC: Mark WM5100 register map cache only when going into BIAS_OFF ASoC: tlv320aic32x4: always enable analouge block ASoC: tlv320aic32x4: always enable dividers ASoC: sgtl5000: Fix wrong register name in restore
2012-01-25ASoC: soc-pcm: msbits constraint: Drop 8 and 16 bit sample sizesPeter Ujfalusi1-1/+1
As per discussion we can safely ignore the 8 and 16 bit sample sizes when applying the msbits constraint. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSIDGustavo Maciel Dias Vieira1-1/+8
HP laptop models with buggy BIOS are apparently frequent, including machines with different codecs. Set the polarity of the mute led based on the SSID and include an entry for the HP Mini 110-3100. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Tested-by: Predrag Ivanovic <predivan@open.telekom.rs> Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-25ALSA: hda - Fix silent output on ASUS A6RpTakashi Iwai1-0/+10
The refactoring of Realtek codec driver in 3.2 kernel caused a regression for ASUS A6Rp laptop; it doesn't give any output. The reason was that this machine has a secret master mute (or EAPD) control via NID 0x0f VREF. Setting VREF50 on this node makes the sound working again. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588 Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-24ASoC: wm8962: Optimise power consumption for IN4 DC measurement usageMark Brown1-0/+18
When the hardware is configured with one or both of the IN4 inputs used for DC measurement (with no DC blocking capacitor connected) then we can improve power consumption slightly in idle modes by applying a register write sequence. Provide platform data to enable this, implemented using a regmap patch. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24ASoC: wm5100: Fix warnings from recent patchesMark Brown1-2/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24ASoC: Convert the WM5100 revision A updates to a regmap patchMark Brown1-29/+17
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24Merge branch 'for-linus' of ↵Linus Torvalds6-34/+63
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops ALSA: HDA: Use model=auto for Thinkpad T510 ALSA: hda - Fix buffer-alignment regression with Nvidia HDMI ALSA: hda - Fix a unused variable warning snd-hda-intel: better Alienware M17x R3 quirk ALSA: hda/realtek - Remove use_jack_tbl field ALSA: hda/realtek - Avoid conflict of unsol-events with static quirks ALSA: hda/realtek - Avoid multi-ios conflicting with multi-speakers
2012-01-24ALSA: Fix memory leak on error in snd_compr_set_params()Jesper Juhl1-5/+8
If copy_from_user() does not return 0 we'll leak the memory we allocated for 'params' when that variable goes out of scope. Also a small CodingStyle cleanup: Use braces on both branches of if/else when one branch needs it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-24ALSA: ymfpci - Don't create invalid PCM & mixers when AC97 doesn't supportRaymond Yau2-15/+27
- check SDAC bit of AC97 primary codec when create "rear" device 3, "4ch" device 2 and "4ch Duplication" switch as the card need a four channels AC97 codec to support surround40. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-24ASoC: wm5100: Fix mismerge of IRQ freesMark Brown1-4/+0
We only want them at the device level, not at the CODEC level. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24ASoC: Convert WM8731 to direct regmap API usageMark Brown1-23/+86
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24ASoC: wm2000: Fix use-after-free - don't release_firmware() twice on errorJesper Juhl1-18/+13
In wm2000_i2c_probe(), if we take the true branch in " ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm2000, NULL, 0); if (ret != 0) goto err_fw; " then we'll release_firmware(fw) at the 'err_fw' label. But we've already done that just a few lines above. That's a use-after-free bug. This patch restructures the code so that we always call release_firmware(fw) before leaving the function, but only ever call it once. This means that we have to initialize 'fw' to NULL since some paths may now end up calling it without having called request_firmware(), but since request_firmware() deals gracefully with NULL pointers, we are fine if we just NULL initialize it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23ASoC: wm8958: Use correct format string in dev_err() callJesper Juhl1-1/+1
To print a value of type size_t one should use %zd, not %d. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptopsTakashi Iwai1-3/+5
The recent change of the power-widget handling for IDT codecs caused the silent output from the docking-station line-out jack. This was partially fixed by the commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33 "ALSA: hda - Fix the lost power-setup of seconary pins after PM resume". But the line-out on the docking-station is still silent when booted with the jack plugged even by this fix. The remainig bug is that the power-widget is set off in stac92xx_init() because the pins in cfg->line_out_pins[] aren't checked there properly but only hp_pins[] are checked in is_nid_hp_pin(). This patch fixes the problem by checking both HP and line-out pins and leaving the power-map correctly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23ALSA: HDA: Use model=auto for Thinkpad T510David Henningsson1-1/+1
The user reports that model=auto works fine for him. Using model=auto bring in new features such as jack detection notification to userspace. Alsa info is available at http://paste.ubuntu.com/805351/ Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23ALSA: hda - Fix buffer-alignment regression with Nvidia HDMITakashi Iwai1-2/+4
The commit 2ae66c26550cd94b0e2606a9275eb0ab7070ad0e ALSA: hda: option to enable arbitrary buffer/period sizes introduced a regression on machines with Intel controller and Nvidia HDMI. The reason is that the driver modifies the global variable align_buffer_size when an Intel controller is found, and the Nvidia HDMI controller is probed after Intel although Nvidia chips require the aligned buffers. This patch fixes the problem by moving the flag into the local struct so that it's not affected by other controllers. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42567 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23ASoC: Add __devinit/__devexit annotations at necessary placesAxel Lin2-3/+3
Fix below build warning when CONFIG_HOTPLUG is not set. CC sound/soc/codecs/alc5623.o sound/soc/codecs/alc5623.c:1062: warning: ‘alc5623_i2c_remove’ defined but not used CC sound/soc/codecs/alc5632.o sound/soc/codecs/alc5632.c:1112: warning: ‘alc5632_i2c_remove’ defined but not used Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23ASoC: sgtl5000: It's sgtl5000 not sgtl500Mark Brown1-4/+4
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-22ASoC: sgtl5000: Convert to table based DAPM and control initFabio Estevam1-10/+7
Convert to table based DAPM and control init. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-22ASoC: wm8996: Call _POST_PMU callback for CPVDDMark Brown1-1/+2
We should be allowing a 5ms delay after the charge pump is started in order to ensure it has finished ramping. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2012-01-21ASoC: wm8988: Convert to devm_kzalloc()Mark Brown1-8/+5
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: wm8988: Convert to table based DAPM and control initMark Brown1-8/+8
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: wm8985: Convert to direct regmap API usageMark Brown1-76/+177
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: wm8985 Don't directly reference the cache data structureMark Brown1-5/+4
In preparation for conversion to regmap. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: wm8985: Use standard cache sync implementationMark Brown1-20/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: wm8985: Convert to table based DAPM and control initMark Brown1-16/+8
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: wm8985: Convert to devm_kzalloc()Mark Brown1-8/+2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: Add external amplifier controls for Visstrim_M10.Javier Martin1-0/+80
Visstrim_M10 has an external class D amplifier. This patch provides support for controlling the 4 possible gain levels and per channel muting. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: Fix build of tlv320dac33Mark Brown1-1/+2
The problem was introduced due to the obscure formatting some of the older drivers use. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: Use regmap update bits operation for drivers using regmapMark Brown3-20/+33
If a driver is using regmap directly ensure that we're coherent with non-ASoC register updates by using the regmap API directly to do our read/modify/write cycles. This will bypass the ASoC cache but drivers using regmap directly should not be using the ASoC cache. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21ASoC: Don't tell applications about msbits unless we're ignoring inputMark Brown1-3/+5
On the off chance that an application both pays attention and gets confused. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: mxs: Fix mxs-saif timeoutFabio Estevam1-0/+5
On a mx28evk board the following errors happens on mxs-sgtl5000 probe: [ 0.660000] saif0_clk_set_rate: divider writing timeout [ 0.670000] mxs-sgtl5000: probe of mxs-sgtl5000.0 failed with error -110 [ 0.670000] ALSA device list: [ 0.680000] No soundcards found. This timeout happens because clk_set_rate will result in writing to the DIV bits of register HW_CLKCTRL_SAIF0 with the saif clock gated (CLKGATE bit set to one). MX28 Reference states the following about CLKGATE: "The DIV field can change ONLY when this clock gate bit field is low." So call clk_prepare_enable prior to clk_set_rate to fix this problem. After this change the mxs-saif driver can be correctly probed and audio is functional. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Push WM5100 interrupt request into I2C probeMark Brown1-58/+63
This is more what the device model wants us to do and will allow use by non-audio functions before the audio part of the device has come up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Make WM5100 interrupt path use regmap directlyMark Brown1-80/+108
This will allow us to move the interrupt allocation out of the ASoC part of the driver and simplifies the locking by removing any reliance in the bulk of the interrupt path on the big CODEC lock. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Remove redundant set_bias_level() from WM5100 remove()Mark Brown1-1/+0
The framework should bring the device down before it calls the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: omap-mcpdm: Set 24msbits constraintPeter Ujfalusi1-0/+2
McPDM internal FIFO is 24 bit wide. From the 32 bit sample 8 bit is discarded. Let application know about this via msbits constraint. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: omap-dmic: Use core to set the msbits constraintPeter Ujfalusi1-4/+3
Core can set the msbits constraint in behalf of the dai. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: twl4030: Use core to set the msbits constraintPeter Ujfalusi1-3/+4
Core can set the msbits constraint in behalf of the dai. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: tlv320dac33: Use core to set the msbits constraintPeter Ujfalusi1-2/+1
Core can set the msbits constraint in behalf of the dai. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: sgtl5000: Print revision number in hexFabio Estevam1-1/+1
Throughout the sgtl5000 driver source code and also in the sgtl5000 datasheet the revision code is shown in hexadecimal. Print it hex format, for consistency. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Say we can't read WM5100 ID registerMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: When releasing WM5100 put /RESET into resetMark Brown1-2/+2
Reset is active low, make sure we leave it asserted when release the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: 24 bits are significant on wm_hubs DAIsMark Brown2-1/+9
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Make WM8993 I2C usage unconditionalMark Brown1-6/+0
The WM8993 only supports I2C so don't ifdef the I2C support in the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Implement basic WM8993 interrupt supportMark Brown1-9/+85
If an interrupt is supplied then use it for thermal warning and FLL lock notifications. When using the interrupt raise the timeout for the FLL lock substantially to reduce the chances of spurious warnings. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: 24 bits are significant on the WM8996 audio interfacesMark Brown1-0/+4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Allow drivers to specify how many bits are significant on a DAIMark Brown1-0/+36
Most devices accept data in formats that don't correspond directly to their internal format. ALSA allows us to set a msbits constraint which tells userspace about this in case it finds it useful (for example, in order to avoid wasting effort dithering bits that will be ignored when raising the sample size of data) so provide a mechanism for drivers to specify the number of bits that are actually significant on a DAI and add the appropriate constraints along with all the others. This is done slightly awkwardly as the constraint is specified per sample size - we loop over every possible sample size, including ones that the device doesn't support and including ones that have fewer bits than are actually used, but this is harmless as the upper layers do the right thing in these cases. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-20ASoC: Add WM8962 DAC and ADC L/R swap supportMark Brown1-0/+2
Simple switches since there's no per-channel control. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: wm8983: Remove useless snd_kcontrolDimitris Papastamos1-5/+0
This must be a leftover from a previous driver. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>