From 65a772172b06e6e9b43e5ad77dccbcc767ff9831 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Fri, 15 Jul 2011 13:13:37 -0400 Subject: sound: fix drivers needing module.h not moduleparam.h The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by: Paul Gortmaker --- sound/pci/hda/patch_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 342540128fb8..e577f93cdda7 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include "hda_codec.h" -- cgit v1.2.3 From da155d5b40587815a4397e1a69382fe2366d940b Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Fri, 15 Jul 2011 12:38:28 -0400 Subject: sound: Add module.h to the previously silent sound users Lots of sound drivers were getting module.h via the implicit presence of it in but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker --- sound/aoa/soundbus/i2sbus/pcm.c | 1 + sound/arm/pxa2xx-ac97-lib.c | 1 + sound/arm/pxa2xx-pcm.c | 1 + sound/core/control.c | 1 + sound/core/hwdep.c | 1 + sound/core/info.c | 1 + sound/core/init.c | 1 + sound/core/jack.c | 1 + sound/core/oss/mixer_oss.c | 1 + sound/core/pcm.c | 1 + sound/core/pcm_native.c | 1 + sound/core/seq/oss/seq_oss_synth.c | 1 + sound/core/seq/seq_device.c | 1 + sound/core/seq/seq_midi_emul.c | 1 + sound/core/seq/seq_midi_event.c | 1 + sound/core/seq/seq_ports.c | 1 + sound/core/seq/seq_virmidi.c | 1 + sound/drivers/mpu401/mpu401_uart.c | 1 + sound/drivers/mtpav.c | 1 + sound/drivers/mts64.c | 1 + sound/drivers/opl3/opl3_lib.c | 1 + sound/drivers/opl3/opl3_seq.c | 1 + sound/drivers/opl4/opl4_lib.c | 1 + sound/drivers/opl4/opl4_seq.c | 1 + sound/drivers/portman2x4.c | 1 + sound/drivers/vx/vx_core.c | 1 + sound/drivers/vx/vx_hwdep.c | 1 + sound/i2c/cs8427.c | 1 + sound/i2c/i2c.c | 1 + sound/i2c/other/ak4113.c | 1 + sound/i2c/other/ak4114.c | 1 + sound/i2c/other/ak4117.c | 1 + sound/i2c/other/ak4xxx-adda.c | 1 + sound/i2c/other/pt2258.c | 1 + sound/i2c/other/tea575x-tuner.c | 1 + sound/i2c/tea6330t.c | 1 + sound/isa/es1688/es1688_lib.c | 1 + sound/isa/gus/gus_main.c | 1 + sound/isa/msnd/msnd.c | 1 + sound/isa/sb/emu8000_synth.c | 1 + sound/isa/sb/sb16_csp.c | 1 + sound/isa/sb/sb16_main.c | 1 + sound/isa/sb/sb8_main.c | 1 + sound/isa/sb/sb_common.c | 1 + sound/isa/wavefront/wavefront_fx.c | 1 + sound/isa/wavefront/wavefront_synth.c | 1 + sound/isa/wss/wss_lib.c | 1 + sound/mips/au1x00.c | 1 + sound/mips/hal2.c | 1 + sound/mips/sgio2audio.c | 1 + sound/pci/ad1889.c | 1 + sound/pci/ak4531_codec.c | 1 + sound/pci/asihpi/asihpi.c | 1 + sound/pci/asihpi/hpioctl.c | 1 + sound/pci/aw2/aw2-alsa.c | 1 + sound/pci/ctxfi/xfi.c | 1 + sound/pci/echoaudio/echoaudio.c | 2 ++ sound/pci/emu10k1/emu10k1_main.c | 1 + sound/pci/emu10k1/emu10k1_synth.c | 1 + sound/pci/hda/hda_codec.c | 1 + sound/pci/hda/patch_analog.c | 1 + sound/pci/hda/patch_ca0110.c | 1 + sound/pci/hda/patch_ca0132.c | 1 + sound/pci/hda/patch_cirrus.c | 1 + sound/pci/hda/patch_cmedia.c | 1 + sound/pci/hda/patch_conexant.c | 1 + sound/pci/hda/patch_realtek.c | 1 + sound/pci/hda/patch_si3054.c | 1 + sound/pci/hda/patch_sigmatel.c | 1 + sound/pci/hda/patch_via.c | 1 + sound/pci/ice1712/ak4xxx.c | 1 + sound/pci/mixart/mixart_hwdep.c | 1 + sound/pci/oxygen/oxygen.c | 1 + sound/pci/oxygen/oxygen_lib.c | 1 + sound/pci/oxygen/virtuoso.c | 1 + sound/pci/pcxhr/pcxhr_hwdep.c | 1 + sound/pci/riptide/riptide.c | 1 + sound/pci/ymfpci/ymfpci_main.c | 1 + sound/ppc/snd_ps3.c | 1 + sound/sh/sh_dac_audio.c | 1 + sound/soc/blackfin/bfin-eval-adav80x.c | 1 + sound/soc/codecs/ac97.c | 1 + sound/soc/codecs/ads117x.c | 1 + sound/soc/codecs/ak4642.c | 1 + sound/soc/codecs/cx20442.c | 1 + sound/soc/codecs/da7210.c | 1 + sound/soc/codecs/dmic.c | 1 + sound/soc/codecs/pcm3008.c | 1 + sound/soc/codecs/sn95031.c | 1 + sound/soc/codecs/wl1273.c | 1 + sound/soc/ep93xx/edb93xx.c | 1 + sound/soc/ep93xx/snappercl15.c | 1 + sound/soc/imx/wm1133-ev1.c | 1 + sound/soc/mid-x86/mfld_machine.c | 1 + sound/soc/mid-x86/sst_platform.c | 1 + sound/soc/omap/am3517evm.c | 1 + sound/soc/omap/ams-delta.c | 1 + sound/soc/omap/igep0020.c | 1 + sound/soc/omap/n810.c | 1 + sound/soc/omap/omap-pcm.c | 1 + sound/soc/omap/omap3beagle.c | 1 + sound/soc/omap/omap3evm.c | 1 + sound/soc/omap/omap3pandora.c | 1 + sound/soc/omap/omap4-hdmi-card.c | 1 + sound/soc/omap/osk5912.c | 1 + sound/soc/omap/overo.c | 1 + sound/soc/omap/rx51.c | 1 + sound/soc/omap/sdp3430.c | 1 + sound/soc/omap/sdp4430.c | 1 + sound/soc/omap/zoom2.c | 1 + sound/soc/pxa/pxa2xx-pcm.c | 1 + sound/soc/samsung/ac97.c | 1 + sound/soc/samsung/dma.c | 1 + sound/soc/samsung/goni_wm8994.c | 1 + sound/soc/samsung/h1940_uda1380.c | 1 + sound/soc/samsung/i2s.c | 1 + sound/soc/samsung/idma.c | 1 + sound/soc/samsung/jive_wm8750.c | 1 + sound/soc/samsung/ln2440sbc_alc650.c | 1 + sound/soc/samsung/pcm.c | 1 + sound/soc/samsung/rx1950_uda1380.c | 1 + sound/soc/samsung/s3c2412-i2s.c | 1 + sound/soc/samsung/s3c24xx-i2s.c | 1 + sound/soc/samsung/s3c24xx_simtec.c | 1 + sound/soc/samsung/s3c24xx_simtec_hermes.c | 1 + sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 1 + sound/soc/samsung/s3c24xx_uda134x.c | 1 + sound/soc/samsung/smartq_wm8987.c | 1 + sound/soc/samsung/smdk_spdif.c | 1 + sound/soc/samsung/smdk_wm8580.c | 1 + sound/soc/samsung/smdk_wm8580pcm.c | 1 + sound/soc/samsung/smdk_wm8994pcm.c | 1 + sound/soc/samsung/smdk_wm9713.c | 1 + sound/soc/samsung/spdif.c | 1 + sound/soc/samsung/speyside.c | 1 + sound/soc/samsung/speyside_wm8962.c | 1 + sound/soc/sh/fsi-ak4642.c | 1 + sound/soc/sh/fsi-da7210.c | 1 + sound/soc/sh/fsi-hdmi.c | 1 + sound/soc/sh/fsi.c | 1 + sound/soc/sh/siu_dai.c | 1 + sound/soc/tegra/tegra_asoc_utils.c | 1 + sound/sparc/dbri.c | 1 + sound/synth/emux/emux.c | 1 + sound/synth/emux/emux_seq.c | 2 +- sound/synth/util_mem.c | 1 + sound/usb/6fire/firmware.c | 1 + sound/usb/card.c | 1 + sound/usb/midi.c | 1 + sound/usb/usx2y/us122l.c | 1 + 150 files changed, 151 insertions(+), 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/aoa/soundbus/i2sbus/pcm.c b/sound/aoa/soundbus/i2sbus/pcm.c index be838993926d..19491ed9292f 100644 --- a/sound/aoa/soundbus/i2sbus/pcm.c +++ b/sound/aoa/soundbus/i2sbus/pcm.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "../soundbus.h" #include "i2sbus.h" diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 8ad65352bf91..d1aa4218f129 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/sound/arm/pxa2xx-pcm.c b/sound/arm/pxa2xx-pcm.c index 535704f77496..26422a3584ea 100644 --- a/sound/arm/pxa2xx-pcm.c +++ b/sound/arm/pxa2xx-pcm.c @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #include #include diff --git a/sound/core/control.c b/sound/core/control.c index 978fe1a8e9f0..49721f5a2ee7 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index a70ee7f1ed98..c7ceb28d885d 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/info.c b/sound/core/info.c index 601f0ebb677b..c1e611c65c8f 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/init.c b/sound/core/init.c index 2c041bb36ab3..3ac49b1b7cb8 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/core/jack.c b/sound/core/jack.c index 240a3e13470d..26edf63b265f 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 1b5e0c49a0ad..18297f7f2c55 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/pcm.c b/sound/core/pcm.c index ee9abb2d9001..8928ca871c22 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index d7d2179c0363..25ed9fe41b89 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index ee44ab9593c0..c5b773a1eea9 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c @@ -24,6 +24,7 @@ #include "seq_oss_midi.h" #include "../seq_lock.h" #include +#include #include /* diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index 1f997675c893..5cf8d65ed5ef 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c @@ -37,6 +37,7 @@ */ #include +#include #include #include #include diff --git a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c index 07c663135c62..6f64471ddde3 100644 --- a/sound/core/seq/seq_midi_emul.c +++ b/sound/core/seq/seq_midi_emul.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c index b5d6ea4904c0..37db7ba492a6 100644 --- a/sound/core/seq/seq_midi_event.c +++ b/sound/core/seq/seq_midi_event.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c index e12bcd94b6db..9516e5ce3aad 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -22,6 +22,7 @@ #include #include +#include #include "seq_system.h" #include "seq_ports.h" #include "seq_clientmgr.h" diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c index 86e7739269ca..4b50e604276d 100644 --- a/sound/core/seq/seq_virmidi.c +++ b/sound/core/seq/seq_virmidi.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index e91698a634b2..1cff331a228e 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 1eef4ccebe4b..76930793fb69 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c @@ -52,6 +52,7 @@ #include #include +#include #include #include #include diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 8539ab0a0893..f24bf9a06cff 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c index 6e31e46ca393..33d9a857a262 100644 --- a/sound/drivers/opl3/opl3_lib.c +++ b/sound/drivers/opl3/opl3_lib.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c index 2d33f53d36b8..723562e34fcc 100644 --- a/sound/drivers/opl3/opl3_seq.c +++ b/sound/drivers/opl3/opl3_seq.c @@ -25,6 +25,7 @@ #include "opl3_voice.h" #include #include +#include #include MODULE_AUTHOR("Uros Bizjak "); diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index f07e38da59b8..b953fb4aa298 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c @@ -22,6 +22,7 @@ #include #include #include +#include #include MODULE_AUTHOR("Clemens Ladisch "); diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c index 43d8a2bdd280..99197699c55a 100644 --- a/sound/drivers/opl4/opl4_seq.c +++ b/sound/drivers/opl4/opl4_seq.c @@ -34,6 +34,7 @@ #include "opl4_local.h" #include #include +#include #include MODULE_AUTHOR("Clemens Ladisch "); diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index f2b0ba22d9ce..f664823a9635 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index 19c6e376c7c7..b8e515999bc2 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c index f7a6fbd313e3..4a1fae99ac55 100644 --- a/sound/drivers/vx/vx_hwdep.c +++ b/sound/drivers/vx/vx_hwdep.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c index 04ae8704cdcd..6c2dc3863ac0 100644 --- a/sound/i2c/cs8427.c +++ b/sound/i2c/cs8427.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c index eb7c7d05a7c1..4677037f0c8e 100644 --- a/sound/i2c/i2c.c +++ b/sound/i2c/i2c.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c index c424d329f806..dde5c9c92132 100644 --- a/sound/i2c/other/ak4113.c +++ b/sound/i2c/other/ak4113.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index d9fb537b0b94..fdf3c1b65e38 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c index 2cad2d612518..b4b2a51fc117 100644 --- a/sound/i2c/other/ak4117.c +++ b/sound/i2c/other/ak4117.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c index 57ccba88700d..cef813d23641 100644 --- a/sound/i2c/other/ak4xxx-adda.c +++ b/sound/i2c/other/ak4xxx-adda.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/i2c/other/pt2258.c b/sound/i2c/other/pt2258.c index 797d3a6687eb..9fa390ba1718 100644 --- a/sound/i2c/other/pt2258.c +++ b/sound/i2c/other/pt2258.c @@ -24,6 +24,7 @@ #include #include #include +#include MODULE_AUTHOR("Jochen Voss "); MODULE_DESCRIPTION("PT2258 volume controller (Princeton Technology Corp.)"); diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 484a35b3715f..6b68c8206805 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c index 0e3a9f2c5297..2d22310dce05 100644 --- a/sound/i2c/tea6330t.c +++ b/sound/i2c/tea6330t.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index d3eab6fb0866..1d47be8170b5 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 3167e5ac3699..4490ee442ff4 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/msnd/msnd.c b/sound/isa/msnd/msnd.c index 3a1526ae1729..1cee18fb28a8 100644 --- a/sound/isa/msnd/msnd.c +++ b/sound/isa/msnd/msnd.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include diff --git a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c index 0c7905c85b76..4e3fcfb15ad4 100644 --- a/sound/isa/sb/emu8000_synth.c +++ b/sound/isa/sb/emu8000_synth.c @@ -22,6 +22,7 @@ #include "emu8000_local.h" #include +#include #include MODULE_AUTHOR("Takashi Iwai, Steve Ratcliffe"); diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c index bdc8dde4e4a2..c1aa21edcb65 100644 --- a/sound/isa/sb/sb16_csp.c +++ b/sound/isa/sb/sb16_csp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c index 2a6cc1cfe945..0bbcd4714d28 100644 --- a/sound/isa/sb/sb16_main.c +++ b/sound/isa/sb/sb16_main.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c index 7d84c9f34dc9..24d4121ab0e0 100644 --- a/sound/isa/sb/sb8_main.c +++ b/sound/isa/sb/sb8_main.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c index d2e19215813e..3ef990602cdd 100644 --- a/sound/isa/sb/sb_common.c +++ b/sound/isa/sb/sb_common.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c index 657e2d6c01ac..e51e0906050b 100644 --- a/sound/isa/wavefront/wavefront_fx.c +++ b/sound/isa/wavefront/wavefront_fx.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 4fb7b19ff393..405f8b6a58b5 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 7277c5b7df6c..49c8a0c2442c 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index 7567ebd71913..3f3ec0bec067 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c index 453d343550a8..2e6c85894e0b 100644 --- a/sound/mips/hal2.c +++ b/sound/mips/hal2.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c index 717604c00f0a..69425d4c91fd 100644 --- a/sound/mips/sgio2audio.c +++ b/sound/mips/sgio2audio.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index 201503673f25..6e311184bb10 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include diff --git a/sound/pci/ak4531_codec.c b/sound/pci/ak4531_codec.c index fd135e3d8a84..cadf7b962e30 100644 --- a/sound/pci/ak4531_codec.c +++ b/sound/pci/ak4531_codec.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index eae62ebbd295..f4b9e2b7ae87 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index a32502e796de..f6b9517b4696 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c @@ -33,6 +33,7 @@ Common Linux HPI ioctl and module probe/remove functions #include #include #include +#include #ifdef MODULE_FIRMWARE MODULE_FIRMWARE("asihpi/dsp5000.bin"); diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c index f8569b11331b..7a581151db0d 100644 --- a/sound/pci/aw2/aw2-alsa.c +++ b/sound/pci/aw2/aw2-alsa.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c index b259aa03a3a9..33931ef5e129 100644 --- a/sound/pci/ctxfi/xfi.c +++ b/sound/pci/ctxfi/xfi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include "ctatc.h" diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index d7306980d0f1..9fd694c61866 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + MODULE_AUTHOR("Giuliano Pochini "); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Echoaudio " ECHOCARD_NAME " soundcards driver"); diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index fcd4935766b2..6a3e5677f591 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c index ad7b71491fc4..4c41c903a840 100644 --- a/sound/pci/emu10k1/emu10k1_synth.c +++ b/sound/pci/emu10k1/emu10k1_synth.c @@ -20,6 +20,7 @@ #include "emu10k1_synth_local.h" #include +#include MODULE_AUTHOR("Takashi Iwai"); MODULE_DESCRIPTION("Routines for control of EMU10K1 WaveTable synth"); diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 1715e8b24ff0..916a1863af73 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "hda_codec.h" #include diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index d8aac588f23b..bcb3310c394f 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "hda_codec.h" diff --git a/sound/pci/hda/patch_ca0110.c b/sound/pci/hda/patch_ca0110.c index 6b406840846e..993757b65736 100644 --- a/sound/pci/hda/patch_ca0110.c +++ b/sound/pci/hda/patch_ca0110.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "hda_codec.h" #include "hda_local.h" diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index d9a2254ceef6..35abe3c62908 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "hda_codec.h" #include "hda_local.h" diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index c45f3e69bcf0..2a2d8645ba09 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "hda_codec.h" #include "hda_local.h" diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c index cd2cf5e94e81..b6767b4ced44 100644 --- a/sound/pci/hda/patch_cmedia.c +++ b/sound/pci/hda/patch_cmedia.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "hda_codec.h" #include "hda_local.h" diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 0c8b5a1993ed..5e706e4d1737 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8f93b97559a5..fca4e6daa9e2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include "hda_codec.h" diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c index 2f55f32876fa..6679a5095e55 100644 --- a/sound/pci/hda/patch_si3054.c +++ b/sound/pci/hda/patch_si3054.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "hda_codec.h" #include "hda_local.h" diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 59a52a430f24..4b17f8621c79 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 417d62ad3b96..7aa7dcc206e2 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include "hda_codec.h" diff --git a/sound/pci/ice1712/ak4xxx.c b/sound/pci/ice1712/ak4xxx.c index 90d560c3df13..3981823f9094 100644 --- a/sound/pci/ice1712/ak4xxx.c +++ b/sound/pci/ice1712/ak4xxx.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include "ice1712.h" diff --git a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c index bf2696aa5d49..bfbdc91e4cb3 100644 --- a/sound/pci/mixart/mixart_hwdep.c +++ b/sound/pci/mixart/mixart_hwdep.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include "mixart.h" diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index 218d9854e5cb..5f3a13d4369d 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index 53e5508abcbf..92e2d67f16a1 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index 773db794b43f..4149a0cb8b73 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/sound/pci/pcxhr/pcxhr_hwdep.c b/sound/pci/pcxhr/pcxhr_hwdep.c index 17cb1233a903..ec1587cddb0c 100644 --- a/sound/pci/pcxhr/pcxhr_hwdep.c +++ b/sound/pci/pcxhr/pcxhr_hwdep.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 88cc776aa38b..dcbedd33a629 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c @@ -98,6 +98,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 66ea71b2a70d..03ee4e365311 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index 775bd95d4be6..a3ce1b22620d 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c index 68e0dee4ff05..56bcb46abf0d 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/blackfin/bfin-eval-adav80x.c b/sound/soc/blackfin/bfin-eval-adav80x.c index 8d014d01626e..897cfa68a2a6 100644 --- a/sound/soc/blackfin/bfin-eval-adav80x.c +++ b/sound/soc/blackfin/bfin-eval-adav80x.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 3c087936aa57..e715186b4300 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c index 8402854ec15e..9082e0f729f3 100644 --- a/sound/soc/codecs/ads117x.c +++ b/sound/soc/codecs/ads117x.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index d8fc04486abb..12c1bdef6732 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index d68ea532cc7f..bc7067db8ae4 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -15,6 +15,7 @@ #include #include +#include #include #include diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index 0ebcbd534490..b545b7d37222 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c index f9a87737ec16..6fae765e3ad8 100644 --- a/sound/soc/codecs/dmic.c +++ b/sound/soc/codecs/dmic.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/codecs/pcm3008.c b/sound/soc/codecs/pcm3008.c index bd8f26e41602..f7316519432c 100644 --- a/sound/soc/codecs/pcm3008.c +++ b/sound/soc/codecs/pcm3008.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index f681e41fc12e..887d618f4a63 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index 9fa14299cf2c..a85498982991 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/ep93xx/edb93xx.c b/sound/soc/ep93xx/edb93xx.c index 0134d4e9131c..51930b6a83af 100644 --- a/sound/soc/ep93xx/edb93xx.c +++ b/sound/soc/ep93xx/edb93xx.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/ep93xx/snappercl15.c b/sound/soc/ep93xx/snappercl15.c index f74ac54c285a..2cde43321eec 100644 --- a/sound/soc/ep93xx/snappercl15.c +++ b/sound/soc/ep93xx/snappercl15.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/sound/soc/imx/wm1133-ev1.c b/sound/soc/imx/wm1133-ev1.c index 75b4c72787e2..490a1260c228 100644 --- a/sound/soc/imx/wm1133-ev1.c +++ b/sound/soc/imx/wm1133-ev1.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c index 598f48c0d8f5..cca693ae1bd4 100644 --- a/sound/soc/mid-x86/mfld_machine.c +++ b/sound/soc/mid-x86/mfld_machine.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index 7df8c58ba50a..23057020aa0f 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c index 8da55e916451..c1cd4a0cbe9e 100644 --- a/sound/soc/omap/am3517evm.c +++ b/sound/soc/omap/am3517evm.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index dcb7b689a4ea..ccb8a6aa1817 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/omap/igep0020.c b/sound/soc/omap/igep0020.c index 84615a7de6ad..591fbf8f7cd9 100644 --- a/sound/soc/omap/igep0020.c +++ b/sound/soc/omap/igep0020.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 7e3c20c965c6..fc6209b3f20c 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "omap-mcbsp.h" diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 5e37ec915de2..6ede7dc6c10a 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c index 40db813c0795..3357dcc47ed4 100644 --- a/sound/soc/omap/omap3beagle.c +++ b/sound/soc/omap/omap3beagle.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c index bf9ae2a6f901..68578959e4aa 100644 --- a/sound/soc/omap/omap3evm.c +++ b/sound/soc/omap/omap3evm.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index 30a75b406aea..7605c37c91e7 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/omap/omap4-hdmi-card.c b/sound/soc/omap/omap4-hdmi-card.c index 9f32615b81f7..8671261ba16d 100644 --- a/sound/soc/omap/omap4-hdmi-card.c +++ b/sound/soc/omap/omap4-hdmi-card.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index db91ccaf6c97..351ec9db384d 100644 --- a/sound/soc/omap/osk5912.c +++ b/sound/soc/omap/osk5912.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "omap-mcbsp.h" diff --git a/sound/soc/omap/overo.c b/sound/soc/omap/overo.c index 739efe9e327a..c3550aeee533 100644 --- a/sound/soc/omap/overo.c +++ b/sound/soc/omap/overo.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index a56842380c72..4cabb74d97e9 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index 4f1969de91a7..e8fbf8efdbb8 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c @@ -37,6 +37,7 @@ /* Register descriptions for twl4030 codec part */ #include +#include #include "omap-mcbsp.h" #include "omap-pcm.h" diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index cc3d792af5ea..03d9fa4192fe 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 7cf35c82368a..7641a7fa8f97 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c @@ -33,6 +33,7 @@ /* Register descriptions for twl4030 codec part */ #include +#include #include "omap-mcbsp.h" #include "omap-pcm.h" diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index c43060053dd7..600676f709a9 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c @@ -11,6 +11,7 @@ */ #include +#include #include #include diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index b5e922f469d5..31a224573b68 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -15,6 +15,7 @@ #include #include #include +#include #include diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index 9465588b02f2..8351a7131e5c 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/sound/soc/samsung/goni_wm8994.c b/sound/soc/samsung/goni_wm8994.c index 4a34f608e131..84f9c3cf7f3e 100644 --- a/sound/soc/samsung/goni_wm8994.c +++ b/sound/soc/samsung/goni_wm8994.c @@ -11,6 +11,7 @@ * */ +#include #include #include diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index f75a4b60cf38..03cfa5fcdcca 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -15,6 +15,7 @@ #include #include +#include #include #include diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 0c9ac20d2223..bff42bf370b9 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index ebde0740ab19..c41178efc908 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c index f5f7c6f822d5..1826acf20f7c 100644 --- a/sound/soc/samsung/jive_wm8750.c +++ b/sound/soc/samsung/jive_wm8750.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include diff --git a/sound/soc/samsung/ln2440sbc_alc650.c b/sound/soc/samsung/ln2440sbc_alc650.c index bd91c19a6c08..cde38b8e9dc2 100644 --- a/sound/soc/samsung/ln2440sbc_alc650.c +++ b/sound/soc/samsung/ln2440sbc_alc650.c @@ -16,6 +16,7 @@ * */ +#include #include static struct snd_soc_card ln2440sbc; diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index e55d7a5c4bdc..05a47cf7f06e 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -13,6 +13,7 @@ #include #include +#include #include #include diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index aea7f1b24e6b..71b4c029fc35 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index f26a8bfb2357..7bbec25e6e15 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index c08117e658db..558c64bbed2e 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/samsung/s3c24xx_simtec.c b/sound/soc/samsung/s3c24xx_simtec.c index c8d525bf6122..a253bcc1646a 100644 --- a/sound/soc/samsung/s3c24xx_simtec.c +++ b/sound/soc/samsung/s3c24xx_simtec.c @@ -9,6 +9,7 @@ #include #include +#include #include diff --git a/sound/soc/samsung/s3c24xx_simtec_hermes.c b/sound/soc/samsung/s3c24xx_simtec_hermes.c index 6bc5a36af1d9..d125e79baf7f 100644 --- a/sound/soc/samsung/s3c24xx_simtec_hermes.c +++ b/sound/soc/samsung/s3c24xx_simtec_hermes.c @@ -7,6 +7,7 @@ * published by the Free Software Foundation. */ +#include #include #include "s3c24xx_simtec.h" diff --git a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c index 7bdda7674008..5e4fd46b7200 100644 --- a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c +++ b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c @@ -7,6 +7,7 @@ * published by the Free Software Foundation. */ +#include #include #include "s3c24xx_simtec.h" diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index 65c1cfd47d8a..548c6ac6e7b0 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -13,6 +13,7 @@ #include #include +#include #include #include diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c index 6ac6bc2bcc4e..a22fc4402802 100644 --- a/sound/soc/samsung/smartq_wm8987.c +++ b/sound/soc/samsung/smartq_wm8987.c @@ -14,6 +14,7 @@ */ #include +#include #include #include diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c index e8ac961c6ba1..e0fd8ad23552 100644 --- a/sound/soc/samsung/smdk_spdif.c +++ b/sound/soc/samsung/smdk_spdif.c @@ -11,6 +11,7 @@ */ #include +#include #include diff --git a/sound/soc/samsung/smdk_wm8580.c b/sound/soc/samsung/smdk_wm8580.c index 8f92ffceb5ca..81b447823992 100644 --- a/sound/soc/samsung/smdk_wm8580.c +++ b/sound/soc/samsung/smdk_wm8580.c @@ -10,6 +10,7 @@ * option) any later version. */ +#include #include #include diff --git a/sound/soc/samsung/smdk_wm8580pcm.c b/sound/soc/samsung/smdk_wm8580pcm.c index 4b9c73477ce0..0677473e6b60 100644 --- a/sound/soc/samsung/smdk_wm8580pcm.c +++ b/sound/soc/samsung/smdk_wm8580pcm.c @@ -8,6 +8,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/sound/soc/samsung/smdk_wm8994pcm.c b/sound/soc/samsung/smdk_wm8994pcm.c index 5f2111685480..da9c2a264d93 100644 --- a/sound/soc/samsung/smdk_wm8994pcm.c +++ b/sound/soc/samsung/smdk_wm8994pcm.c @@ -9,6 +9,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c index fffe3c1dd1bd..31c6daf6d4d0 100644 --- a/sound/soc/samsung/smdk_wm9713.c +++ b/sound/soc/samsung/smdk_wm9713.c @@ -11,6 +11,7 @@ * */ +#include #include static struct snd_soc_card smdk; diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 3122f3154bfa..468cff1bb1af 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -12,6 +12,7 @@ #include #include +#include #include #include diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c index b9e213f6cc06..85bf541a771d 100644 --- a/sound/soc/samsung/speyside.c +++ b/sound/soc/samsung/speyside.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "../codecs/wm8996.h" #include "../codecs/wm9081.h" diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/speyside_wm8962.c index 8a082044436e..e3e27166cc50 100644 --- a/sound/soc/samsung/speyside_wm8962.c +++ b/sound/soc/samsung/speyside_wm8962.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "../codecs/wm8962.h" diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c index 770a71a15366..dff64b95f5dc 100644 --- a/sound/soc/sh/fsi-ak4642.c +++ b/sound/soc/sh/fsi-ak4642.c @@ -10,6 +10,7 @@ */ #include +#include #include struct fsi_ak4642_data { diff --git a/sound/soc/sh/fsi-da7210.c b/sound/soc/sh/fsi-da7210.c index 59553fd8c2fb..f5586b5b0c3b 100644 --- a/sound/soc/sh/fsi-da7210.c +++ b/sound/soc/sh/fsi-da7210.c @@ -11,6 +11,7 @@ */ #include +#include #include static int fsi_da7210_init(struct snd_soc_pcm_runtime *rtd) diff --git a/sound/soc/sh/fsi-hdmi.c b/sound/soc/sh/fsi-hdmi.c index d3d9fd880680..3ebebe706ad3 100644 --- a/sound/soc/sh/fsi-hdmi.c +++ b/sound/soc/sh/fsi-hdmi.c @@ -10,6 +10,7 @@ */ #include +#include #include struct fsi_hdmi_data { diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index a32fd16ad668..3d7016e128f9 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c index 4973c2939d79..edacfeb13b94 100644 --- a/sound/soc/sh/siu_dai.c +++ b/sound/soc/sh/siu_dai.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c index dfa85cbb05c8..f8428e410e05 100644 --- a/sound/soc/tegra/tegra_asoc_utils.c +++ b/sound/soc/tegra/tegra_asoc_utils.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "tegra_asoc_utils.h" diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 1b839a0f3653..4a4f1d740330 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c @@ -70,6 +70,7 @@ #include #include #include +#include MODULE_AUTHOR("Rudolf Koenig, Brent Baccala and Martin Habets"); MODULE_DESCRIPTION("Sun DBRI"); diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c index f16a3fce4597..93522072bc87 100644 --- a/sound/synth/emux/emux.c +++ b/sound/synth/emux/emux.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "emux_voice.h" MODULE_AUTHOR("Takashi Iwai"); diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c index ca5f7effb4df..7778b8e19782 100644 --- a/sound/synth/emux/emux_seq.c +++ b/sound/synth/emux/emux_seq.c @@ -21,7 +21,7 @@ #include "emux_voice.h" #include - +#include /* Prototypes for static functions */ static void free_port(void *private); diff --git a/sound/synth/util_mem.c b/sound/synth/util_mem.c index c85522e3808d..8e34bc4e07ec 100644 --- a/sound/synth/util_mem.c +++ b/sound/synth/util_mem.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index 07bcfe4d18a7..3b5f517a3972 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c @@ -15,6 +15,7 @@ */ #include +#include #include #include diff --git a/sound/usb/card.c b/sound/usb/card.c index 05c1aae0b010..0f6dc0d457bf 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include diff --git a/sound/usb/midi.c b/sound/usb/midi.c index e21f026d9577..c83f6143c0eb 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index 084e6fc8d5bf..726c1a7b89b8 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From d81a6d71760c4d8323f1f9a506c64084caa09063 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Thu, 22 Sep 2011 09:34:58 -0400 Subject: sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where needed These aren't modules, but they do make use of these macros, so they will need export.h to get that definition. Previously, they got it via the implicit module.h inclusion. Signed-off-by: Paul Gortmaker --- sound/core/device.c | 1 + sound/core/info_oss.c | 1 + sound/core/isadma.c | 1 + sound/core/memory.c | 1 + sound/core/misc.c | 1 + sound/core/pcm_lib.c | 1 + sound/core/pcm_memory.c | 1 + sound/core/pcm_misc.c | 1 + sound/core/seq/oss/seq_oss_init.c | 1 + sound/core/seq/seq_clientmgr.c | 1 + sound/core/seq/seq_info.c | 1 + sound/core/seq/seq_lock.c | 1 + sound/core/seq/seq_memory.c | 1 + sound/core/seq/seq_system.c | 1 + sound/core/sound_oss.c | 1 + sound/core/vmaster.c | 1 + sound/drivers/opl3/opl3_oss.c | 1 + sound/drivers/opl3/opl3_synth.c | 1 + sound/drivers/opl4/opl4_proc.c | 1 + sound/firewire/iso-resources.c | 1 + sound/firewire/packets-buffer.c | 1 + sound/isa/gus/gus_volume.c | 1 + sound/isa/msnd/msnd_midi.c | 1 + sound/isa/msnd/msnd_pinnacle_mixer.c | 1 + sound/isa/sb/emu8000.c | 1 + sound/isa/sb/emu8000_callback.c | 1 + sound/pci/ac97/ac97_pcm.c | 1 + sound/pci/au88x0/au88x0_game.c | 1 + sound/pci/cs46xx/cs46xx_lib.c | 1 + sound/pci/emu10k1/emu10k1_callback.c | 1 + sound/pci/emu10k1/io.c | 1 + sound/pci/emu10k1/memory.c | 1 + sound/pci/emu10k1/voice.c | 1 + sound/pci/hda/hda_beep.c | 1 + sound/pci/hda/hda_generic.c | 1 + sound/pci/hda/hda_hwdep.c | 1 + sound/pci/oxygen/oxygen_io.c | 1 + sound/pci/trident/trident_main.c | 1 + sound/soc/soc-cache.c | 1 + sound/soc/soc-io.c | 1 + sound/soc/soc-jack.c | 1 + sound/soc/soc-utils.c | 1 + sound/synth/emux/emux_oss.c | 1 + sound/synth/emux/emux_synth.c | 1 + sound/synth/emux/soundfont.c | 1 + 45 files changed, 45 insertions(+) (limited to 'sound/pci/hda') diff --git a/sound/core/device.c b/sound/core/device.c index 2d1ad4b0cd65..f03cb5444a5a 100644 --- a/sound/core/device.c +++ b/sound/core/device.c @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c index e4af138d651a..cf42ab5080eb 100644 --- a/sound/core/info_oss.c +++ b/sound/core/info_oss.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/isadma.c b/sound/core/isadma.c index 950e19ba91fc..c0f1208bb7df 100644 --- a/sound/core/isadma.c +++ b/sound/core/isadma.c @@ -26,6 +26,7 @@ #undef HAVE_REALLY_SLOW_DMA_CONTROLLER +#include #include #include diff --git a/sound/core/memory.c b/sound/core/memory.c index 1161158582a6..66a278d0b04e 100644 --- a/sound/core/memory.c +++ b/sound/core/memory.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include diff --git a/sound/core/misc.c b/sound/core/misc.c index 9aad55b9f1f0..465f0ce772cb 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 95d1e789715f..3420bd3da5d7 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 150cb7edffee..957131366dd9 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c index 88f02e3866e0..9c9eff9afbac 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #define SND_PCM_FORMAT_UNKNOWN (-1) diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index 69cd7b3c362d..e3cb46fef2c7 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -28,6 +28,7 @@ #include "seq_oss_timer.h" #include "seq_oss_event.h" #include +#include #include #include diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index f2436d33fbf7..4dc6bae80e15 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/sound/core/seq/seq_info.c b/sound/core/seq/seq_info.c index 201f8106ffdd..acf7769419f0 100644 --- a/sound/core/seq/seq_info.c +++ b/sound/core/seq/seq_info.c @@ -20,6 +20,7 @@ */ #include +#include #include #include "seq_info.h" diff --git a/sound/core/seq/seq_lock.c b/sound/core/seq/seq_lock.c index 54f921edda79..2cfe50c71a9d 100644 --- a/sound/core/seq/seq_lock.c +++ b/sound/core/seq/seq_lock.c @@ -19,6 +19,7 @@ * */ +#include #include #include "seq_lock.h" diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index 7f50c1437675..f478f770bf52 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c index c38b90cf3cb0..8ce1d0b40dce 100644 --- a/sound/core/seq/seq_system.c +++ b/sound/core/seq/seq_system.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include "seq_system.h" diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 0c164e5e4322..c70092043061 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -26,6 +26,7 @@ #endif #include +#include #include #include #include diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index a39d3d8c2f9c..5dbab38d04af 100644 --- a/sound/core/vmaster.c +++ b/sound/core/vmaster.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c index ade3ca52422e..c1cb249acfaa 100644 --- a/sound/drivers/opl3/opl3_oss.c +++ b/sound/drivers/opl3/opl3_oss.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "opl3_voice.h" static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure); diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index 301acb6b9cf9..742a4b642fd9 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c @@ -20,6 +20,7 @@ */ #include +#include #include #include diff --git a/sound/drivers/opl4/opl4_proc.c b/sound/drivers/opl4/opl4_proc.c index df850b8830a5..9b824bfc919d 100644 --- a/sound/drivers/opl4/opl4_proc.c +++ b/sound/drivers/opl4/opl4_proc.c @@ -19,6 +19,7 @@ #include "opl4_local.h" #include +#include #include #ifdef CONFIG_PROC_FS diff --git a/sound/firewire/iso-resources.c b/sound/firewire/iso-resources.c index ffe20b877e9f..5f17b77ee152 100644 --- a/sound/firewire/iso-resources.c +++ b/sound/firewire/iso-resources.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/firewire/packets-buffer.c b/sound/firewire/packets-buffer.c index 3c61ca2e6152..ea1506679c66 100644 --- a/sound/firewire/packets-buffer.c +++ b/sound/firewire/packets-buffer.c @@ -6,6 +6,7 @@ */ #include +#include #include #include "packets-buffer.h" diff --git a/sound/isa/gus/gus_volume.c b/sound/isa/gus/gus_volume.c index c3c028a4a46b..3dd841ae708a 100644 --- a/sound/isa/gus/gus_volume.c +++ b/sound/isa/gus/gus_volume.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #define __GUS_TABLES_ALLOC__ diff --git a/sound/isa/msnd/msnd_midi.c b/sound/isa/msnd/msnd_midi.c index 787495674235..ffc67fd80c23 100644 --- a/sound/isa/msnd/msnd_midi.c +++ b/sound/isa/msnd/msnd_midi.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include diff --git a/sound/isa/msnd/msnd_pinnacle_mixer.c b/sound/isa/msnd/msnd_pinnacle_mixer.c index 494058a1a502..1de59d441426 100644 --- a/sound/isa/msnd/msnd_pinnacle_mixer.c +++ b/sound/isa/msnd/msnd_pinnacle_mixer.c @@ -16,6 +16,7 @@ ***************************************************************************/ #include +#include #include #include diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c index 5d61f5a29130..71887874679c 100644 --- a/sound/isa/sb/emu8000.c +++ b/sound/isa/sb/emu8000.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/isa/sb/emu8000_callback.c b/sound/isa/sb/emu8000_callback.c index 9a3c71cc2e07..344b4355be1c 100644 --- a/sound/isa/sb/emu8000_callback.c +++ b/sound/isa/sb/emu8000_callback.c @@ -20,6 +20,7 @@ */ #include "emu8000_local.h" +#include #include /* diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c index 48cbda9378c5..f1488fc176d5 100644 --- a/sound/pci/ac97/ac97_pcm.c +++ b/sound/pci/ac97/ac97_pcm.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/sound/pci/au88x0/au88x0_game.c b/sound/pci/au88x0/au88x0_game.c index e291aa59742e..c07c792bde8d 100644 --- a/sound/pci/au88x0/au88x0_game.c +++ b/sound/pci/au88x0/au88x0_game.c @@ -34,6 +34,7 @@ #include #include "au88x0.h" #include +#include #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 9546bf07f0d1..4fa53161b094 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -53,6 +53,7 @@ #include #include #include +#include #include diff --git a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c index 7ef949d99a50..a0afa5057488 100644 --- a/sound/pci/emu10k1/emu10k1_callback.c +++ b/sound/pci/emu10k1/emu10k1_callback.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "emu10k1_synth_local.h" #include diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c index 5ef7080e14d0..e4fba49fee4a 100644 --- a/sound/pci/emu10k1/io.c +++ b/sound/pci/emu10k1/io.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "p17v.h" unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn) diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index c250614dadd0..4f502a2bdc3c 100644 --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/sound/pci/emu10k1/voice.c b/sound/pci/emu10k1/voice.c index 20b8da250bd0..101e7cb79cb2 100644 --- a/sound/pci/emu10k1/voice.c +++ b/sound/pci/emu10k1/voice.c @@ -29,6 +29,7 @@ */ #include +#include #include #include diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 29714c818b53..60738e52b8f9 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "hda_beep.h" #include "hda_local.h" diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index a63c54d9d767..431bf868711e 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -22,6 +22,7 @@ #include #include +#include #include #include "hda_codec.h" #include "hda_local.h" diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 72e5885007cc..a6d54595bb7b 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "hda_codec.h" #include "hda_local.h" diff --git a/sound/pci/oxygen/oxygen_io.c b/sound/pci/oxygen/oxygen_io.c index f5164b1e1c80..521eae458348 100644 --- a/sound/pci/oxygen/oxygen_io.c +++ b/sound/pci/oxygen/oxygen_io.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 5bd57a7c52d2..61d3c0e8d4ce 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 143c705ac27b..9077aa4b3b4e 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -17,6 +17,7 @@ #include #include #include +#include #include diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index dd89933e2c72..c8610cbf34a5 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 52db96636290..6c5ebd38c1b0 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -17,6 +17,7 @@ #include #include #include +#include #include /** diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index ec921ec99c26..0c12b98484bd 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c index 87e42206c4ef..319754cf6208 100644 --- a/sound/synth/emux/emux_oss.c +++ b/sound/synth/emux/emux_oss.c @@ -25,6 +25,7 @@ #ifdef CONFIG_SND_SEQUENCER_OSS +#include #include #include #include "emux_voice.h" diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c index 3e921b386fd5..9a38de459acb 100644 --- a/sound/synth/emux/emux_synth.c +++ b/sound/synth/emux/emux_synth.c @@ -22,6 +22,7 @@ * */ +#include #include "emux_voice.h" #include diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c index 67c91230c197..1137b85c36e6 100644 --- a/sound/synth/emux/soundfont.c +++ b/sound/synth/emux/soundfont.c @@ -27,6 +27,7 @@ */ #include #include +#include #include #include #include -- cgit v1.2.3 From 359f90982cba0ba8db39b683de05dcb2de64b979 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Tue, 1 Nov 2011 09:40:07 +0100 Subject: ALSA: hda_hwdep: Fix possible buffer overflow If a line in the firmware file is larger than the given buffer size (and so the firmware file size), size is set to a value larger than the actual buffer size. This results in an overflow in the buffer passed. Signed-off-by: Alexander Stein Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_hwdep.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 72e5885007cc..7e7d0788ddcf 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -756,8 +756,6 @@ static int get_line_from_fw(char *buf, int size, struct firmware *fw) } if (!fw->size) return 0; - if (size < fw->size) - size = fw->size; for (len = 0; len < fw->size; len++) { if (!*p) -- cgit v1.2.3 From 08a1f5eb435640741c7b7d10fb339425dff786bb Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 2 Nov 2011 07:44:11 +0100 Subject: ALSA: hda - Check NO_PRESENCE pincfg default bit HD-audio spec defines a bit in pin default configuration for indicating that the pin isn't used for jack-detection although the codec is capable of it. Better to check this bit as well in jack_is_detectable() helper function. Reported-by: Raymond Yau Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_local.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 81e12c0ed0a2..79f49e2e8cbc 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -442,6 +442,8 @@ struct auto_pin_cfg { (cfg & AC_DEFCFG_SEQUENCE) #define get_defcfg_device(cfg) \ ((cfg & AC_DEFCFG_DEVICE) >> AC_DEFCFG_DEVICE_SHIFT) +#define get_defcfg_misc(cfg) \ + ((cfg & AC_DEFCFG_MISC) >> AC_DEFCFG_MISC_SHIFT) /* bit-flags for snd_hda_parse_pin_def_config() behavior */ #define HDA_PINCFG_NO_HP_FIXUP (1 << 0) /* no HP-split */ @@ -509,6 +511,8 @@ int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) { return (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT) && + !(get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid) & + AC_DEFCFG_MISC_NO_PRESENCE)) && (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP); } -- cgit v1.2.3 From 35c11777b906042eca9e6f1c03e464726c7faa07 Mon Sep 17 00:00:00 2001 From: Charles Chin Date: Wed, 2 Nov 2011 07:53:30 +0100 Subject: ALSA: hda - Disable power-widget control for IDT 92HD83/93 as default The power-widget control in patch_stac92hd83xxx() never worked properly, thus it's safer to turn it off as default for now. Signed-off-by: Charles Chin Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 59a52a430f24..e826ff75548b 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -5629,26 +5629,8 @@ again: stac92xx_set_config_regs(codec, stac92hd83xxx_brd_tbl[spec->board_config]); - switch (codec->vendor_id) { - case 0x111d76d1: - case 0x111d76d9: - case 0x111d76df: - case 0x111d76e5: - case 0x111d7666: - case 0x111d7667: - case 0x111d7668: - case 0x111d7669: - case 0x111d76e3: - case 0x111d7604: - case 0x111d76d4: - case 0x111d7605: - case 0x111d76d5: - case 0x111d76e7: - if (spec->board_config == STAC_92HD83XXX_PWR_REF) - break; + if (spec->board_config != STAC_92HD83XXX_PWR_REF) spec->num_pwrs = 0; - break; - } codec->patch_ops = stac92xx_patch_ops; -- cgit v1.2.3 From ad5d8755116b431f0709c745ee17cb567a478d43 Mon Sep 17 00:00:00 2001 From: Charles Chin Date: Wed, 2 Nov 2011 07:56:58 +0100 Subject: ALSA: hda - Add support for 92HD65 / 92HD66 family of codecs These codecs have SPDIF-in, which is new to the 92HD83xxx compatible families, so a bit of logic is added to support them. Signed-off-by: Charles Chin Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e826ff75548b..5961e727b2cf 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -5657,7 +5657,11 @@ again: } #endif - err = stac92xx_parse_auto_config(codec, 0x1d, 0); + /* 92HD65/66 series has S/PDIF-IN */ + if (codec->vendor_id >= 0x111d76e8 && codec->vendor_id <= 0x111d76f3) + err = stac92xx_parse_auto_config(codec, 0x1d, 0x22); + else + err = stac92xx_parse_auto_config(codec, 0x1d, 0); if (!err) { if (spec->board_config < 0) { printk(KERN_WARNING "hda_codec: No auto-config is " @@ -6547,6 +6551,18 @@ static const struct hda_codec_preset snd_hda_preset_sigmatel[] = { { .id = 0x111d76e3, .name = "92HD98BXX", .patch = patch_stac92hd83xxx}, { .id = 0x111d76e5, .name = "92HD99BXX", .patch = patch_stac92hd83xxx}, { .id = 0x111d76e7, .name = "92HD90BXX", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76e8, .name = "92HD66B1X5", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76e9, .name = "92HD66B2X5", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76ea, .name = "92HD66B3X5", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76eb, .name = "92HD66C1X5", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76ec, .name = "92HD66C2X5", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76ed, .name = "92HD66C3X5", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76ee, .name = "92HD66B1X3", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76ef, .name = "92HD66B2X3", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76f0, .name = "92HD66B3X3", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76f1, .name = "92HD66C1X3", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76f2, .name = "92HD66C2X3", .patch = patch_stac92hd83xxx}, + { .id = 0x111d76f3, .name = "92HD66C3/65", .patch = patch_stac92hd83xxx}, {} /* terminator */ }; -- cgit v1.2.3 From 1fa1757366783fb52e6e85c2d735db49b818d382 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 2 Nov 2011 21:30:51 +0100 Subject: ALSA: hda/realtek - Don't create alt-stream for capture when unnecessary When the driver finds multiple ADCs, it tries to create an alternative capture PCM stream. However, these secondary ADCs might be useless or in uncontrolled paths in some cases, e.g. when auto-mic or dynamic ADC-switching is enabled. Also, when only a single capture source is available, the multi-streams don't make sense, too. With this patch, the driver checks such condition and skips the alt stream appropriately. Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8f93b97559a5..4468cb7ea688 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2270,6 +2270,7 @@ static int alc_build_pcms(struct hda_codec *codec) struct alc_spec *spec = codec->spec; struct hda_pcm *info = spec->pcm_rec; const struct hda_pcm_stream *p; + bool have_multi_adcs; int i; codec->num_pcms = 1; @@ -2348,8 +2349,11 @@ static int alc_build_pcms(struct hda_codec *codec) /* If the use of more than one ADC is requested for the current * model, configure a second analog capture-only PCM. */ + have_multi_adcs = (spec->num_adc_nids > 1) && + !spec->dyn_adc_switch && !spec->auto_mic && + (!spec->input_mux || spec->input_mux->num_items > 1); /* Additional Analaog capture for index #2 */ - if (spec->alt_dac_nid || spec->num_adc_nids > 1) { + if (spec->alt_dac_nid || have_multi_adcs) { codec->num_pcms = 3; info = spec->pcm_rec + 2; info->name = spec->stream_name_analog; @@ -2365,7 +2369,7 @@ static int alc_build_pcms(struct hda_codec *codec) alc_pcm_null_stream; info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0; } - if (spec->num_adc_nids > 1) { + if (have_multi_adcs) { p = spec->stream_analog_alt_capture; if (!p) p = &alc_pcm_analog_alt_capture; -- cgit v1.2.3 From 112daa7a4c09059ae93e1a3de42e874c13a30728 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 2 Nov 2011 21:40:06 +0100 Subject: ALSA: hda - Remove unused variables Just clean-up what GCC caught. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_hdmi.c | 5 +---- sound/pci/hda/patch_realtek.c | 3 --- sound/pci/hda/patch_via.c | 5 ----- 3 files changed, 1 insertion(+), 12 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 342540128fb8..aac3bfacda3f 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1006,7 +1006,6 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) unsigned int caps, config; int pin_idx; struct hdmi_spec_per_pin *per_pin; - struct hdmi_eld *eld; int err; caps = snd_hda_param_read(codec, pin_nid, AC_PAR_PIN_CAP); @@ -1023,7 +1022,6 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) pin_idx = spec->num_pins; per_pin = &spec->pins[pin_idx]; - eld = &per_pin->sink_eld; per_pin->pin_nid = pin_nid; @@ -1576,7 +1574,7 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo, struct snd_pcm_substream *substream) { int chs; - unsigned int dataDCC1, dataDCC2, channel_id; + unsigned int dataDCC2, channel_id; int i; struct hdmi_spec *spec = codec->spec; struct hda_spdif_out *spdif = @@ -1586,7 +1584,6 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo, chs = substream->runtime->channels; - dataDCC1 = AC_DIG1_ENABLE | AC_DIG1_COPYRIGHT; dataDCC2 = 0x2; /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */ diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4468cb7ea688..9543bc8aaef6 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2661,7 +2661,6 @@ static int alc_auto_fill_adc_caps(struct hda_codec *codec) hda_nid_t *adc_nids = spec->private_adc_nids; hda_nid_t *cap_nids = spec->private_capsrc_nids; int max_nums = ARRAY_SIZE(spec->private_adc_nids); - bool indep_capsrc = false; int i, nums = 0; nid = codec->start_nid; @@ -2683,13 +2682,11 @@ static int alc_auto_fill_adc_caps(struct hda_codec *codec) break; if (type == AC_WID_AUD_SEL) { cap_nids[nums] = src; - indep_capsrc = true; break; } n = snd_hda_get_conn_list(codec, src, &list); if (n > 1) { cap_nids[nums] = src; - indep_capsrc = true; break; } else if (n != 1) break; diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 417d62ad3b96..0b020a93a8ed 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -3700,13 +3700,8 @@ static const struct hda_verb vt1812_init_verbs[] = { static void set_widgets_power_state_vt1812(struct hda_codec *codec) { struct via_spec *spec = codec->spec; - int imux_is_smixer = - snd_hda_codec_read(codec, 0x13, 0, AC_VERB_GET_CONNECT_SEL, 0x00) == 3; unsigned int parm; unsigned int present; - /* MUX10 (1eh) = stereo mixer */ - imux_is_smixer = - snd_hda_codec_read(codec, 0x1e, 0, AC_VERB_GET_CONNECT_SEL, 0x00) == 5; /* inputs */ /* PW 5/6/7 (29h/2ah/2bh) */ parm = AC_PWRST_D3; -- cgit v1.2.3 From 9009b0e41c1e81e1a30acdb5d4ffbb6dc5e1345f Mon Sep 17 00:00:00 2001 From: Charles Chin Date: Thu, 3 Nov 2011 10:27:27 +0100 Subject: ALSA: hda/sigmatel - Automatically retrieve digital I/O widgets Revise stac92xx_parse_auto_config to automatically scan for digital input and output converters. Signed-off-by: Charles Chin Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 5961e727b2cf..de4c36027cbe 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -3791,9 +3791,10 @@ static int is_dual_headphones(struct hda_codec *codec) } -static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out, hda_nid_t dig_in) +static int stac92xx_parse_auto_config(struct hda_codec *codec) { struct sigmatel_spec *spec = codec->spec; + hda_nid_t dig_out = 0, dig_in = 0; int hp_swap = 0; int i, err; @@ -3976,6 +3977,22 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out if (spec->multiout.max_channels > 2) spec->surr_switch = 1; + /* find digital out and in converters */ + for (i = codec->start_nid; i < codec->start_nid + codec->num_nodes; i++) { + unsigned int wid_caps = get_wcaps(codec, i); + if (wid_caps & AC_WCAP_DIGITAL) { + switch (get_wcaps_type(wid_caps)) { + case AC_WID_AUD_OUT: + if (!dig_out) + dig_out = i; + break; + case AC_WID_AUD_IN: + if (!dig_in) + dig_in = i; + break; + } + } + } if (spec->autocfg.dig_outs) spec->multiout.dig_out_nid = dig_out; if (dig_in && spec->autocfg.dig_in_pin) @@ -5279,7 +5296,7 @@ static int patch_stac925x(struct hda_codec *codec) spec->capvols = stac925x_capvols; spec->capsws = stac925x_capsws; - err = stac92xx_parse_auto_config(codec, 0x8, 0x7); + err = stac92xx_parse_auto_config(codec); if (!err) { if (spec->board_config < 0) { printk(KERN_WARNING "hda_codec: No auto-config is " @@ -5420,7 +5437,7 @@ again: spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); spec->pwr_nids = stac92hd73xx_pwr_nids; - err = stac92xx_parse_auto_config(codec, 0x25, 0x27); + err = stac92xx_parse_auto_config(codec); if (!err) { if (spec->board_config < 0) { @@ -5657,11 +5674,7 @@ again: } #endif - /* 92HD65/66 series has S/PDIF-IN */ - if (codec->vendor_id >= 0x111d76e8 && codec->vendor_id <= 0x111d76f3) - err = stac92xx_parse_auto_config(codec, 0x1d, 0x22); - else - err = stac92xx_parse_auto_config(codec, 0x1d, 0); + err = stac92xx_parse_auto_config(codec); if (!err) { if (spec->board_config < 0) { printk(KERN_WARNING "hda_codec: No auto-config is " @@ -5982,7 +5995,7 @@ again: spec->multiout.dac_nids = spec->dac_nids; - err = stac92xx_parse_auto_config(codec, 0x21, 0); + err = stac92xx_parse_auto_config(codec); if (!err) { if (spec->board_config < 0) { printk(KERN_WARNING "hda_codec: No auto-config is " @@ -6091,7 +6104,7 @@ static int patch_stac922x(struct hda_codec *codec) spec->multiout.dac_nids = spec->dac_nids; - err = stac92xx_parse_auto_config(codec, 0x08, 0x09); + err = stac92xx_parse_auto_config(codec); if (!err) { if (spec->board_config < 0) { printk(KERN_WARNING "hda_codec: No auto-config is " @@ -6216,7 +6229,7 @@ static int patch_stac927x(struct hda_codec *codec) spec->aloopback_shift = 0; spec->eapd_switch = 1; - err = stac92xx_parse_auto_config(codec, 0x1e, 0x20); + err = stac92xx_parse_auto_config(codec); if (!err) { if (spec->board_config < 0) { printk(KERN_WARNING "hda_codec: No auto-config is " @@ -6341,7 +6354,7 @@ static int patch_stac9205(struct hda_codec *codec) break; } - err = stac92xx_parse_auto_config(codec, 0x1f, 0x20); + err = stac92xx_parse_auto_config(codec); if (!err) { if (spec->board_config < 0) { printk(KERN_WARNING "hda_codec: No auto-config is " @@ -6446,7 +6459,7 @@ static int patch_stac9872(struct hda_codec *codec) spec->capvols = stac9872_capvols; spec->capsws = stac9872_capsws; - err = stac92xx_parse_auto_config(codec, 0x10, 0x12); + err = stac92xx_parse_auto_config(codec); if (err < 0) { stac92xx_free(codec); return -EINVAL; -- cgit v1.2.3 From 51e4152a969aa6d2306492ebf143932dcb535c9b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 3 Nov 2011 16:54:06 +0100 Subject: ALSA: hda/realtek - Skip invalid digital out pins Some BIOS report invalid pins as digital output pins. The driver checks the connection but it doesn't do it fully correctly, and it leaves some undefined value as the audio-out widget, which makes the driver spewing warnings. This patch fixes the issue. Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348 Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9543bc8aaef6..80d6add8a620 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1604,27 +1604,29 @@ static void alc_auto_init_digital(struct hda_codec *codec) static void alc_auto_parse_digital(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; - int i, err; + int i, err, nums; hda_nid_t dig_nid; /* support multiple SPDIFs; the secondary is set up as a slave */ + nums = 0; for (i = 0; i < spec->autocfg.dig_outs; i++) { hda_nid_t conn[4]; err = snd_hda_get_connections(codec, spec->autocfg.dig_out_pins[i], conn, ARRAY_SIZE(conn)); - if (err < 0) + if (err <= 0) continue; dig_nid = conn[0]; /* assume the first element is audio-out */ - if (!i) { + if (!nums) { spec->multiout.dig_out_nid = dig_nid; spec->dig_out_type = spec->autocfg.dig_out_type[0]; } else { spec->multiout.slave_dig_outs = spec->slave_dig_outs; - if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1) + if (nums >= ARRAY_SIZE(spec->slave_dig_outs) - 1) break; - spec->slave_dig_outs[i - 1] = dig_nid; + spec->slave_dig_outs[nums - 1] = dig_nid; } + nums++; } if (spec->autocfg.dig_in_pin) { -- cgit v1.2.3 From 43dea228a3ba5463392281535dfb3d3fe56f4c2c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 6 Nov 2011 11:25:34 +0100 Subject: ALSA: hda - Fix silent output regression with ALC861 The 3.1 kernel has a regression for ALC861 codec where no sound output is heard with the default setup. It's because the amps in DACs aren't properly unmuted while the output mixers are assigned only to pins. This patch fixes the missing initialization of DACs when no mixer is assigned to them. Tested-by: Andrea Iob Cc: [v3.1+] Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 80d6add8a620..9693059dec84 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3329,6 +3329,12 @@ static void alc_auto_set_output_and_unmute(struct hda_codec *codec, if (nid) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO); + + /* unmute DAC if it's not assigned to a mixer */ + nid = alc_look_for_out_mute_nid(codec, pin, dac); + if (nid == mix && nid_has_mute(codec, dac, HDA_OUTPUT)) + snd_hda_codec_write(codec, dac, 0, AC_VERB_SET_AMP_GAIN_MUTE, + AMP_OUT_ZERO); } static void alc_auto_init_multi_out(struct hda_codec *codec) -- cgit v1.2.3 From 69f9ba9b0cad67bc03f0a096f7f274de795ca844 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 6 Nov 2011 13:49:13 +0100 Subject: ALSA: hda - Fix a regression for DMA-position check with CA0110 The regression-fix in 3.1 for the check of DMA-position validity caused yet another regression for CA0110. As usual, this hardware seems working only with LPIB properly. Adding the appropriate driver-caps bit to force LPIB fixes the problem. Reported-and-tested-by: Andres Freund Cc: [v3.1] Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index bd7fc99af187..096507d2ca9a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -3063,12 +3063,12 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8, .class_mask = 0xffffff, .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND | - AZX_DCAPS_RIRB_PRE_DELAY }, + AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB }, #else /* this entry seems still valid -- i.e. without emu20kx chip */ { PCI_DEVICE(0x1102, 0x0009), .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND | - AZX_DCAPS_RIRB_PRE_DELAY }, + AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB }, #endif /* Vortex86MX */ { PCI_DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC }, -- cgit v1.2.3 From f441917256c9727d3573ca2f89f657a75e06a262 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 6 Nov 2011 14:01:58 +0100 Subject: ALSA: hda - Revert the check of NO_PRESENCE pincfg default bit The implementation on commit [08a1f5eb: ALSA: hda - Check NO_PRESENCE pincfg default bit] seems like a mis-interpretation of specification. The spec gives the reversed bit definition. But, following the spec also causes to change so many existing device configurations, thus we can't change it so easily for now. For 3.2-rc1, it's safer to revert this check (actually this patch comments out the code). We may re-introduced the fixed version once after the wider test-case coverages are done. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_local.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 79f49e2e8cbc..dcbea0da0fa2 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -511,8 +511,11 @@ int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) { return (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT) && - !(get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid) & - AC_DEFCFG_MISC_NO_PRESENCE)) && + /* disable MISC_NO_PRESENCE check because it may break too + * many devices + */ + /*(get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid) & + AC_DEFCFG_MISC_NO_PRESENCE)) &&*/ (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP); } -- cgit v1.2.3 From dccc1810f41b42773a2e359907f05a7fd10910bd Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 8 Nov 2011 07:52:19 +0100 Subject: ALSA: hda - Mute unused capture sources for Realtek codecs When a Realtek codec has a matrix-style capture-source selection, we need to scan all connections instead of only imux items. Otherwise some input might be kept unmuted. Although the corresponding input must be dead so there should be no input from it, it's still safer to mute the route completely. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a24e068a021b..308bb575bc06 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -284,7 +284,7 @@ static int alc_mux_select(struct hda_codec *codec, unsigned int adc_idx, struct alc_spec *spec = codec->spec; const struct hda_input_mux *imux; unsigned int mux_idx; - int i, type; + int i, type, num_conns; hda_nid_t nid; mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; @@ -307,16 +307,17 @@ static int alc_mux_select(struct hda_codec *codec, unsigned int adc_idx, spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx]; /* no selection? */ - if (snd_hda_get_conn_list(codec, nid, NULL) <= 1) + num_conns = snd_hda_get_conn_list(codec, nid, NULL); + if (num_conns <= 1) return 1; type = get_wcaps_type(get_wcaps(codec, nid)); if (type == AC_WID_AUD_MIX) { /* Matrix-mixer style (e.g. ALC882) */ - for (i = 0; i < imux->num_items; i++) { - unsigned int v = (i == idx) ? 0 : HDA_AMP_MUTE; - snd_hda_codec_amp_stereo(codec, nid, HDA_INPUT, - imux->items[i].index, + int active = imux->items[idx].index; + for (i = 0; i < num_conns; i++) { + unsigned int v = (i == active) ? 0 : HDA_AMP_MUTE; + snd_hda_codec_amp_stereo(codec, nid, HDA_INPUT, i, HDA_AMP_MUTE, v); } } else { -- cgit v1.2.3 From 8d1c963a2e0c57dfe7f9c356389902e500cf1cfd Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Tue, 8 Nov 2011 20:37:26 +0100 Subject: ALSA: HDA: Remove quirk for Toshiba T110 According to the bug reporter, model=auto is needed to make the internal microphone work. BugLink: https://bugs.launchpad.net/bugs/819699 Reported-by: Andrej (agno01) Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_conexant.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 5e706e4d1737..0de21193a2b0 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3062,7 +3062,6 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1993, "Asus U50F", CXT5066_ASUS), SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD), SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), - SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), SND_PCI_QUIRK(0x14f1, 0x0101, "Conexant Reference board", CXT5066_LAPTOP), SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), -- cgit v1.2.3 From f7f9bdfadfda07afb904a9767468e38c2d1a6033 Mon Sep 17 00:00:00 2001 From: Julian Wollrath Date: Wed, 9 Nov 2011 10:02:40 +0100 Subject: ALSA: hda - fix internal mic on Dell Vostro 3500 laptop Fix the not working internal mic on Dell Vostro 3500 laptop by introducing the new model dell-vostro-3500. Signed-off-by: Julian Wollrath Cc: Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/HD-Audio-Models.txt | 1 + sound/pci/hda/patch_sigmatel.c | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'sound/pci/hda') diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 4f3443230d89..edad99abec21 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt @@ -349,6 +349,7 @@ STAC92HD83* ref Reference board mic-ref Reference board with power management for ports dell-s14 Dell laptop + dell-vostro-3500 Dell Vostro 3500 laptop hp HP laptops with (inverted) mute-LED hp-dv7-4000 HP dv-7 4000 auto BIOS setup (default) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 4e715fefebef..edc2b7bc177c 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -95,6 +95,7 @@ enum { STAC_92HD83XXX_REF, STAC_92HD83XXX_PWR_REF, STAC_DELL_S14, + STAC_DELL_VOSTRO_3500, STAC_92HD83XXX_HP, STAC_92HD83XXX_HP_cNB11_INTQUAD, STAC_HP_DV7_4000, @@ -1659,6 +1660,12 @@ static const unsigned int dell_s14_pin_configs[10] = { 0x40f000f0, 0x40f000f0, }; +static const unsigned int dell_vostro_3500_pin_configs[10] = { + 0x02a11020, 0x0221101f, 0x400000f0, 0x90170110, + 0x400000f1, 0x400000f2, 0x400000f3, 0x90a60160, + 0x400000f4, 0x400000f5, +}; + static const unsigned int hp_dv7_4000_pin_configs[10] = { 0x03a12050, 0x0321201f, 0x40f000f0, 0x90170110, 0x40f000f0, 0x40f000f0, 0x90170110, 0xd5a30140, @@ -1675,6 +1682,7 @@ static const unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, [STAC_DELL_S14] = dell_s14_pin_configs, + [STAC_DELL_VOSTRO_3500] = dell_vostro_3500_pin_configs, [STAC_92HD83XXX_HP_cNB11_INTQUAD] = hp_cNB11_intquad_pin_configs, [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs, }; @@ -1684,6 +1692,7 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { [STAC_92HD83XXX_REF] = "ref", [STAC_92HD83XXX_PWR_REF] = "mic-ref", [STAC_DELL_S14] = "dell-s14", + [STAC_DELL_VOSTRO_3500] = "dell-vostro-3500", [STAC_92HD83XXX_HP] = "hp", [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", [STAC_HP_DV7_4000] = "hp-dv7-4000", @@ -1697,6 +1706,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { "DFI LanParty", STAC_92HD83XXX_REF), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba, "unknown Dell", STAC_DELL_S14), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x1028, + "Dell Vostro 3500", STAC_DELL_VOSTRO_3500), SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x3600, "HP", STAC_92HD83XXX_HP), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656, -- cgit v1.2.3 From aeb4b88ec0a948efce8e3a23a8f964d3560a7308 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 10 Nov 2011 12:28:38 +0100 Subject: ALSA: hda - Don't add elements of other codecs to vmaster slave When a virtual mater control is created, the driver looks for slave elements from the assigned card instance. But this may include the elements of other codecs when multiple codecs are on the same HD-audio bus. This works at the first time, but it'll give Oops when it's once freed and re-created via reconfig sysfs. This patch changes the element-look-up strategy to limit only to the mixer elements of the same codec. Reported-by: David Henningsson Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 60 ++++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 21 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 916a1863af73..e9136711b2d5 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2331,6 +2331,39 @@ int snd_hda_codec_reset(struct hda_codec *codec) return 0; } +typedef int (*map_slave_func_t)(void *, struct snd_kcontrol *); + +/* apply the function to all matching slave ctls in the mixer list */ +static int map_slaves(struct hda_codec *codec, const char * const *slaves, + map_slave_func_t func, void *data) +{ + struct hda_nid_item *items; + const char * const *s; + int i, err; + + items = codec->mixers.list; + for (i = 0; i < codec->mixers.used; i++) { + struct snd_kcontrol *sctl = items[i].kctl; + if (!sctl || !sctl->id.name || + sctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER) + continue; + for (s = slaves; *s; s++) { + if (!strcmp(sctl->id.name, *s)) { + err = func(data, sctl); + if (err) + return err; + break; + } + } + } + return 0; +} + +static int check_slave_present(void *data, struct snd_kcontrol *sctl) +{ + return 1; +} + /** * snd_hda_add_vmaster - create a virtual master control and add slaves * @codec: HD-audio codec @@ -2351,12 +2384,10 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name, unsigned int *tlv, const char * const *slaves) { struct snd_kcontrol *kctl; - const char * const *s; int err; - for (s = slaves; *s && !snd_hda_find_mixer_ctl(codec, *s); s++) - ; - if (!*s) { + err = map_slaves(codec, slaves, check_slave_present, NULL); + if (err != 1) { snd_printdd("No slave found for %s\n", name); return 0; } @@ -2367,23 +2398,10 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name, if (err < 0) return err; - for (s = slaves; *s; s++) { - struct snd_kcontrol *sctl; - int i = 0; - for (;;) { - sctl = _snd_hda_find_mixer_ctl(codec, *s, i); - if (!sctl) { - if (!i) - snd_printdd("Cannot find slave %s, " - "skipped\n", *s); - break; - } - err = snd_ctl_add_slave(kctl, sctl); - if (err < 0) - return err; - i++; - } - } + err = map_slaves(codec, slaves, (map_slave_func_t)snd_ctl_add_slave, + kctl); + if (err < 0) + return err; return 0; } EXPORT_SYMBOL_HDA(snd_hda_add_vmaster); -- cgit v1.2.3 From 2f451d2a2a44b66586b803763068195088f9ccd4 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 10 Nov 2011 12:36:46 +0100 Subject: ALSA: hda - Re-enable the check NO_PRESENCE misc bit We disabled the check of NO_PRESENCE bit of the default pin-config in commit f4419172 temporarily. One problem was that the first implementation was wrong -- the bit after the shift must be checked. However, this would still give many regressions on machines with broken BIOS. They set this bit wrongly even on active pins. A workaround is to check whether all pins contain this bit. As far as I've checked, broken BIOSen set this bit on all pins, no matter whether active or not. In such a case, the driver should ignore this bit check. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 4 ++++ sound/pci/hda/hda_codec.h | 1 + sound/pci/hda/hda_local.h | 16 +++++++++------- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e9136711b2d5..e44b107fdc75 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -4770,6 +4770,7 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, memset(sequences_hp, 0, sizeof(sequences_hp)); assoc_line_out = 0; + codec->ignore_misc_bit = true; end_nid = codec->start_nid + codec->num_nodes; for (nid = codec->start_nid; nid < end_nid; nid++) { unsigned int wid_caps = get_wcaps(codec, nid); @@ -4785,6 +4786,9 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, continue; def_conf = snd_hda_codec_get_pincfg(codec, nid); + if (!(get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & + AC_DEFCFG_MISC_NO_PRESENCE)) + codec->ignore_misc_bit = false; conn = get_defcfg_connect(def_conf); if (conn == AC_JACK_PORT_NONE) continue; diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 755f2b0f9d8e..564471169cae 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -854,6 +854,7 @@ struct hda_codec { unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */ unsigned int pins_shutup:1; /* pins are shut up */ unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ + unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */ #ifdef CONFIG_SND_HDA_POWER_SAVE unsigned int power_on :1; /* current (global) power-state */ unsigned int power_transition :1; /* power-state in transition */ diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index dcbea0da0fa2..6579e0f2bb57 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -510,13 +510,15 @@ int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) { - return (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT) && - /* disable MISC_NO_PRESENCE check because it may break too - * many devices - */ - /*(get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid) & - AC_DEFCFG_MISC_NO_PRESENCE)) &&*/ - (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP); + if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) + return false; + if (!codec->ignore_misc_bit && + (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & + AC_DEFCFG_MISC_NO_PRESENCE)) + return false; + if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP)) + return false; + return true; } /* flags for hda_nid_item */ -- cgit v1.2.3 From afef2cfa0ecf45dec7e88db9fa312ee82d347111 Mon Sep 17 00:00:00 2001 From: Charles Chin Date: Fri, 11 Nov 2011 08:05:28 +0100 Subject: ALSA: hda - pwr_nids cleanup for IDT codecs Clean up and fix pwr_nids for 92HD71 / 73 / 83 family codecs; remove pwr_mapping which was incorrect. The original pwr_nids support of 92HD83xxx was incorrect and never actually worked before. Now we should have things working correctly without having to hack by DID anymore. It is also not necessary to explicitly turn on all the pins near the beginning of patch_stac92hd83xxx() now, the pins will go though initialization properly. Tested on 92HD66 / 71 / 73 / 75 / 83 / 89 / 91 demo boards. Signed-off-by: Charles Chin Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index edc2b7bc177c..470f6f286e81 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -227,7 +227,6 @@ struct sigmatel_spec { /* power management */ unsigned int num_pwrs; - const unsigned int *pwr_mapping; const hda_nid_t *pwr_nids; const hda_nid_t *dac_list; @@ -374,18 +373,15 @@ static const unsigned long stac92hd73xx_capvols[] = { #define STAC92HD83_DAC_COUNT 3 -static const hda_nid_t stac92hd83xxx_pwr_nids[4] = { - 0xa, 0xb, 0xd, 0xe, +static const hda_nid_t stac92hd83xxx_pwr_nids[7] = { + 0x0a, 0x0b, 0x0c, 0xd, 0x0e, + 0x0f, 0x10 }; static const hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { 0x1e, 0, }; -static const unsigned int stac92hd83xxx_pwr_mapping[4] = { - 0x03, 0x0c, 0x20, 0x40, -}; - static const hda_nid_t stac92hd83xxx_dmic_nids[] = { 0x11, 0x20, }; @@ -4470,8 +4466,12 @@ static int stac92xx_init(struct hda_codec *codec) stac_toggle_power_map(codec, nid, 1); continue; } - if (enable_pin_detect(codec, nid, STAC_PWR_EVENT)) + if (enable_pin_detect(codec, nid, STAC_PWR_EVENT)) { stac_issue_unsol_event(codec, nid); + continue; + } + /* none of the above, turn the port OFF */ + stac_toggle_power_map(codec, nid, 0); } /* sync mute LED */ @@ -4727,11 +4727,7 @@ static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid, if (idx >= spec->num_pwrs) return; - /* several codecs have two power down bits */ - if (spec->pwr_mapping) - idx = spec->pwr_mapping[idx]; - else - idx = 1 << idx; + idx = 1 << idx; val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) & 0xff; if (enable) @@ -5629,9 +5625,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e); } - /* reset pin power-down; Windows may leave these bits after reboot */ - snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7EC, 0); - snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7ED, 0); codec->no_trigger_sense = 1; codec->spec = spec; @@ -5641,7 +5634,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; spec->digbeep_nid = 0x21; spec->pwr_nids = stac92hd83xxx_pwr_nids; - spec->pwr_mapping = stac92hd83xxx_pwr_mapping; spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); spec->multiout.dac_nids = spec->dac_nids; spec->init = stac92hd83xxx_core_init; @@ -5658,9 +5650,6 @@ again: stac92xx_set_config_regs(codec, stac92hd83xxx_brd_tbl[spec->board_config]); - if (spec->board_config != STAC_92HD83XXX_PWR_REF) - spec->num_pwrs = 0; - codec->patch_ops = stac92xx_patch_ops; if (find_mute_led_gpio(codec, 0)) @@ -5869,8 +5858,6 @@ again: (codec->revision_id & 0xf) == 1) spec->stream_delay = 40; /* 40 milliseconds */ - /* no output amps */ - spec->num_pwrs = 0; /* disable VSW */ spec->init = stac92hd71bxx_core_init; unmute_init++; @@ -5885,8 +5872,6 @@ again: if ((codec->revision_id & 0xf) == 1) spec->stream_delay = 40; /* 40 milliseconds */ - /* no output amps */ - spec->num_pwrs = 0; /* fallthru */ default: spec->init = stac92hd71bxx_core_init; -- cgit v1.2.3 From e53de8f00c80fd1a312c95bc5157fdb98d46e070 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Sun, 13 Nov 2011 23:11:50 +0100 Subject: ALSA: hda/realtek: remove redundant semicolon Having just one semicolon after a break statement is enough. Signed-off-by: Jesper Juhl Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 308bb575bc06..336d14eb72af 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1452,7 +1452,7 @@ static void alc_apply_fixup(struct hda_codec *codec, int action) switch (fix->type) { case ALC_FIXUP_SKU: if (action != ALC_FIXUP_ACT_PRE_PROBE || !fix->v.sku) - break;; + break; snd_printdd(KERN_INFO "hda_codec: %s: " "Apply sku override for %s\n", codec->chip_name, modelname); -- cgit v1.2.3 From b95d68b8179764e29558b75cec35ef4a6a98925b Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 16 Nov 2011 16:29:46 +0800 Subject: ALSA: hda - fix ELD memory leak memset(eld) clears eld->proc_entry which will leak the struct snd_info_entry when unloading module. Fix it by - memset only the fields before eld->eld_buffer - set eld->eld_valid to true _after_ all eld fields have been filled Cc: Cc: Pierre-louis Bossart Acked-by: Stephen Warren Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_eld.c | 5 +---- sound/pci/hda/hda_local.h | 3 +++ sound/pci/hda/patch_hdmi.c | 11 +++++------ 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 1c8ddf547a2d..a065d6d2d6ff 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c @@ -297,10 +297,10 @@ static int hdmi_update_eld(struct hdmi_eld *e, buf + ELD_FIXED_BYTES + mnl + 3 * i); } + e->eld_valid = true; return 0; out_fail: - e->eld_ver = 0; return -EINVAL; } @@ -323,9 +323,6 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld, * ELD is valid, actual eld_size is assigned in hdmi_update_eld() */ - if (!eld->eld_valid) - return -ENOENT; - size = snd_hdmi_get_eld_size(codec, nid); if (size == 0) { /* wfg: workaround for ASUS P5E-VM HDMI board */ diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 6579e0f2bb57..618ddad17236 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -653,6 +653,9 @@ struct hdmi_eld { int spk_alloc; int sad_count; struct cea_sad sad[ELD_MAX_SAD]; + /* + * all fields above eld_buffer will be cleared before updating ELD + */ char eld_buffer[ELD_MAX_SIZE]; #ifdef CONFIG_PROC_FS struct snd_info_entry *proc_entry; diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 81b7b791b3c3..aebfee50bd88 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -980,20 +980,19 @@ static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid, * the unsolicited response to avoid custom WARs. */ int present = snd_hda_pin_sense(codec, pin_nid); + bool eld_valid = false; - memset(eld, 0, sizeof(*eld)); + memset(eld, 0, offsetof(struct hdmi_eld, eld_buffer)); eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE); if (eld->monitor_present) - eld->eld_valid = !!(present & AC_PINSENSE_ELDV); - else - eld->eld_valid = 0; + eld_valid = !!(present & AC_PINSENSE_ELDV); printk(KERN_INFO "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", - codec->addr, pin_nid, eld->monitor_present, eld->eld_valid); + codec->addr, pin_nid, eld->monitor_present, eld_valid); - if (eld->eld_valid) + if (eld_valid) if (!snd_hdmi_get_eld(eld, codec, pin_nid)) snd_hdmi_show_eld(eld); -- cgit v1.2.3 From 744626dada90cb1231a65b08874aa7a9f11c2ea8 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 16 Nov 2011 16:29:47 +0800 Subject: ALSA: hda - delayed ELD repoll The Intel HDMI chips (ironlake at least) are found to have ~250ms delay between the ELD_Valid=1 hotplug event is send and the ELD buffer becomes actually readable. During the time the ELD buffer is mysteriously all 0. Fix it by scheduling a delayed work to re-read ELD buffer after 300ms. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_hdmi.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index aebfee50bd88..a76139b60154 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -65,7 +65,10 @@ struct hdmi_spec_per_pin { hda_nid_t pin_nid; int num_mux_nids; hda_nid_t mux_nids[HDA_MAX_CONNECTIONS]; + + struct hda_codec *codec; struct hdmi_eld sink_eld; + struct delayed_work work; }; struct hdmi_spec { @@ -745,8 +748,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx, * Unsolicited events */ -static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid, - struct hdmi_eld *eld); +static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, bool retry); static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) { @@ -766,7 +768,7 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) return; eld = &spec->pins[pin_idx].sink_eld; - hdmi_present_sense(codec, pin_nid, eld); + hdmi_present_sense(&spec->pins[pin_idx], true); /* * HDMI sink's ELD info cannot always be retrieved for now, e.g. @@ -968,9 +970,11 @@ static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx) return 0; } -static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid, - struct hdmi_eld *eld) +static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, bool retry) { + struct hda_codec *codec = per_pin->codec; + struct hdmi_eld *eld = &per_pin->sink_eld; + hda_nid_t pin_nid = per_pin->pin_nid; /* * Always execute a GetPinSense verb here, even when called from * hdmi_intrinsic_event; for some NVIDIA HW, the unsolicited @@ -992,13 +996,27 @@ static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid, "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", codec->addr, pin_nid, eld->monitor_present, eld_valid); - if (eld_valid) + if (eld_valid) { if (!snd_hdmi_get_eld(eld, codec, pin_nid)) snd_hdmi_show_eld(eld); + else if (retry) { + queue_delayed_work(codec->bus->workq, + &per_pin->work, + msecs_to_jiffies(300)); + } + } snd_hda_input_jack_report(codec, pin_nid); } +static void hdmi_repoll_eld(struct work_struct *work) +{ + struct hdmi_spec_per_pin *per_pin = + container_of(to_delayed_work(work), struct hdmi_spec_per_pin, work); + + hdmi_present_sense(per_pin, false); +} + static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) { struct hdmi_spec *spec = codec->spec; @@ -1227,7 +1245,7 @@ static int generic_hdmi_build_jack(struct hda_codec *codec, int pin_idx) if (err < 0) return err; - hdmi_present_sense(codec, per_pin->pin_nid, &per_pin->sink_eld); + hdmi_present_sense(per_pin, false); return 0; } @@ -1278,6 +1296,8 @@ static int generic_hdmi_init(struct hda_codec *codec) AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | pin_nid); + per_pin->codec = codec; + INIT_DELAYED_WORK(&per_pin->work, hdmi_repoll_eld); snd_hda_eld_proc_new(codec, eld, pin_idx); } return 0; @@ -1292,10 +1312,12 @@ static void generic_hdmi_free(struct hda_codec *codec) struct hdmi_spec_per_pin *per_pin = &spec->pins[pin_idx]; struct hdmi_eld *eld = &per_pin->sink_eld; + cancel_delayed_work(&per_pin->work); snd_hda_eld_proc_free(codec, eld); } snd_hda_input_jack_free(codec); + flush_workqueue(codec->bus->workq); kfree(spec); } -- cgit v1.2.3 From 2d1b439bdb3cee0ae5ccbd7f65e1e5852b1c2718 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 16 Nov 2011 16:29:48 +0800 Subject: ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld() It looks more natural and saves two lines of code. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_eld.c | 8 ++++++++ sound/pci/hda/patch_hdmi.c | 10 ---------- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index a065d6d2d6ff..7ae7578bdcc0 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c @@ -297,6 +297,14 @@ static int hdmi_update_eld(struct hdmi_eld *e, buf + ELD_FIXED_BYTES + mnl + 3 * i); } + /* + * HDMI sink's ELD info cannot always be retrieved for now, e.g. + * in console or for audio devices. Assume the highest speakers + * configuration, to _not_ prohibit multi-channel audio playback. + */ + if (!e->spk_alloc) + e->spk_alloc = 0xffff; + e->eld_valid = true; return 0; diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index a76139b60154..9850c5b481ea 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -757,7 +757,6 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) int pd = !!(res & AC_UNSOL_RES_PD); int eldv = !!(res & AC_UNSOL_RES_ELDV); int pin_idx; - struct hdmi_eld *eld; printk(KERN_INFO "HDMI hot plug event: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", @@ -766,17 +765,8 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) pin_idx = pin_nid_to_pin_index(spec, pin_nid); if (pin_idx < 0) return; - eld = &spec->pins[pin_idx].sink_eld; hdmi_present_sense(&spec->pins[pin_idx], true); - - /* - * HDMI sink's ELD info cannot always be retrieved for now, e.g. - * in console or for audio devices. Assume the highest speakers - * configuration, to _not_ prohibit multi-channel audio playback. - */ - if (!eld->spk_alloc) - eld->spk_alloc = 0xffff; } static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res) -- cgit v1.2.3 From 05ee7964a470d29889ac48cc8274c1b5a1904a11 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 16 Nov 2011 18:05:11 +0100 Subject: ALSA: hda - Fix the connection selection of ADCs on Cirrus codecs spec->cur_adc isn't set until cs_capture_pcm_prepare() is called although the driver tries to select the connection at init time and at auto-mic switch. This results in the access to the widget NID 0, which is obviously invalid, also a wrong capture source. This patch fixes the issue by issuing the connect-select verb conditionally at appropriate places. Reported-and-tested-by: Dylan Reid Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_cirrus.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 2a2d8645ba09..2fbab8e29576 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -237,6 +237,15 @@ static int cs_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout); } +static void cs_update_input_select(struct hda_codec *codec) +{ + struct cs_spec *spec = codec->spec; + if (spec->cur_adc) + snd_hda_codec_write(codec, spec->cur_adc, 0, + AC_VERB_SET_CONNECT_SEL, + spec->adc_idx[spec->cur_input]); +} + /* * Analog capture */ @@ -250,6 +259,7 @@ static int cs_capture_pcm_prepare(struct hda_pcm_stream *hinfo, spec->cur_adc = spec->adc_nid[spec->cur_input]; spec->cur_adc_stream_tag = stream_tag; spec->cur_adc_format = format; + cs_update_input_select(codec); snd_hda_codec_setup_stream(codec, spec->cur_adc, stream_tag, 0, format); return 0; } @@ -689,10 +699,8 @@ static int change_cur_input(struct hda_codec *codec, unsigned int idx, spec->cur_adc_stream_tag, 0, spec->cur_adc_format); } - snd_hda_codec_write(codec, spec->cur_adc, 0, - AC_VERB_SET_CONNECT_SEL, - spec->adc_idx[idx]); spec->cur_input = idx; + cs_update_input_select(codec); return 1; } @@ -973,10 +981,7 @@ static void cs_automic(struct hda_codec *codec) } else { spec->cur_input = spec->last_input; } - - snd_hda_codec_write_cache(codec, spec->cur_adc, 0, - AC_VERB_SET_CONNECT_SEL, - spec->adc_idx[spec->cur_input]); + cs_update_input_select(codec); } else { if (present) change_cur_input(codec, spec->automic_idx, 0); @@ -1073,9 +1078,7 @@ static void init_input(struct hda_codec *codec) cs_automic(codec); else { spec->cur_adc = spec->adc_nid[spec->cur_input]; - snd_hda_codec_write(codec, spec->cur_adc, 0, - AC_VERB_SET_CONNECT_SEL, - spec->adc_idx[spec->cur_input]); + cs_update_input_select(codec); } } else { change_cur_input(codec, spec->cur_input, 1); -- cgit v1.2.3 From dbd1b5473ce8ae40fe7385eacc9294355eec0676 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sat, 19 Nov 2011 11:41:30 +0100 Subject: ALSA: hda - Add pin fix for Alienware M17x R3 Reported-by: Albert Pool Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 470f6f286e81..f3658658548e 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1641,6 +1641,8 @@ static const struct snd_pci_quirk stac92hd73xx_codec_id_cfg_tbl[] = { "Alienware M17x", STAC_ALIENWARE_M17X), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x043a, "Alienware M17x", STAC_ALIENWARE_M17X), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490, + "Alienware M17x", STAC_ALIENWARE_M17X), {} /* terminator */ }; -- cgit v1.2.3 From c6e8453e7511001e453f8b20b9ceefd231946867 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Fri, 18 Nov 2011 16:59:32 -0600 Subject: ALSA: hda - repoll ELD content for multiple times Improve the one-shot ELD repoll to up to 6 retries. Up to now the 300ms looks sufficient for the test boxes. However I'm a bit worried about how well it can fit the wider user base. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_hdmi.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 9850c5b481ea..c505fd5d338c 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -69,6 +69,7 @@ struct hdmi_spec_per_pin { struct hda_codec *codec; struct hdmi_eld sink_eld; struct delayed_work work; + int repoll_count; }; struct hdmi_spec { @@ -748,7 +749,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx, * Unsolicited events */ -static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, bool retry); +static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll); static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) { @@ -766,7 +767,7 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) if (pin_idx < 0) return; - hdmi_present_sense(&spec->pins[pin_idx], true); + hdmi_present_sense(&spec->pins[pin_idx], 1); } static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res) @@ -960,7 +961,7 @@ static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx) return 0; } -static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, bool retry) +static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) { struct hda_codec *codec = per_pin->codec; struct hdmi_eld *eld = &per_pin->sink_eld; @@ -989,7 +990,7 @@ static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, bool retry) if (eld_valid) { if (!snd_hdmi_get_eld(eld, codec, pin_nid)) snd_hdmi_show_eld(eld); - else if (retry) { + else if (repoll) { queue_delayed_work(codec->bus->workq, &per_pin->work, msecs_to_jiffies(300)); @@ -1004,7 +1005,10 @@ static void hdmi_repoll_eld(struct work_struct *work) struct hdmi_spec_per_pin *per_pin = container_of(to_delayed_work(work), struct hdmi_spec_per_pin, work); - hdmi_present_sense(per_pin, false); + if (per_pin->repoll_count++ > 6) + per_pin->repoll_count = 0; + + hdmi_present_sense(per_pin, per_pin->repoll_count); } static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) @@ -1235,7 +1239,7 @@ static int generic_hdmi_build_jack(struct hda_codec *codec, int pin_idx) if (err < 0) return err; - hdmi_present_sense(per_pin, false); + hdmi_present_sense(per_pin, 0); return 0; } -- cgit v1.2.3 From a370fc62b9ad3f73abe2a721de6c03cdcce95b54 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Tue, 22 Nov 2011 16:46:23 +0800 Subject: ALSA: hda - fail ELD reading early With the ELD repoll mechanism, we can (and should) fail the ELD reading immediately when find something obviously wrong and let the caller retry after some delay. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_eld.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 7ae7578bdcc0..c1da422e085a 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c @@ -347,18 +347,28 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld, for (i = 0; i < size; i++) { unsigned int val = hdmi_get_eld_data(codec, nid, i); + /* + * Graphics driver might be writing to ELD buffer right now. + * Just abort. The caller will repoll after a while. + */ if (!(val & AC_ELDD_ELD_VALID)) { - if (!i) { - snd_printd(KERN_INFO - "HDMI: invalid ELD data\n"); - ret = -EINVAL; - goto error; - } snd_printd(KERN_INFO "HDMI: invalid ELD data byte %d\n", i); - val = 0; - } else - val &= AC_ELDD_ELD_DATA; + ret = -EINVAL; + goto error; + } + val &= AC_ELDD_ELD_DATA; + /* + * The first byte cannot be zero. This can happen on some DVI + * connections. Some Intel chips may also need some 250ms delay + * to return non-zero ELD data, even when the graphics driver + * correctly writes ELD content before setting ELD_valid bit. + */ + if (!val && !i) { + snd_printdd(KERN_INFO "HDMI: 0 ELD data\n"); + ret = -EINVAL; + goto error; + } buf[i] = val; } -- cgit v1.2.3 From e2301a4de22c438f5a962c7cefc3e9cba736991c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 22 Nov 2011 19:58:56 +0100 Subject: ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config() In snd_hda_check_board_codec_sid_config(), not only comparing with the exact value but allow the bit-mask comparison for vendor-only, etc. Tested-by: Linus Torvalds Tested-by: Dirk Hohndel Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e44b107fdc75..4562e9de6a1a 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -4046,9 +4046,9 @@ int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, /* Search for codec ID */ for (q = tbl; q->subvendor; q++) { - unsigned long vendorid = (q->subdevice) | (q->subvendor << 16); - - if (vendorid == codec->subsystem_id) + unsigned int mask = 0xffff0000 | q->subdevice_mask; + unsigned int id = (q->subdevice | (q->subvendor << 16)) & mask; + if ((codec->subsystem_id & mask) == id) break; } -- cgit v1.2.3 From 6dfeb703e386369d9f1585d29482efe7b2b4401d Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 22 Nov 2011 20:00:31 +0100 Subject: ALSA: hda - Fix invalid pin and GPIO for Apple laptops with CS codecs The PCI SSID 8086:7270 is commonly used for multiple Apple machines, thus we can't use it as identifier for a unique model. Because of this conflict, some machines show weird behavior. For example, MacBook Air shows Front and Surround speakers although only Surround works due to the wrongly overridden pin-configuration for imac27. This patch fixes two things: - Stop the wrong pin-config override of imac27 by removing PCI SSID entry for avoiding the wrong mappings, - Add the generic GPIO setup for Apple machines by checking the codec SSID vendor bits Tested-by: Linus Torvalds Tested-by: Dirk Hohndel Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_cirrus.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 2fbab8e29576..7bd2a52f2bac 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -58,6 +58,8 @@ struct cs_spec { unsigned int gpio_mask; unsigned int gpio_dir; unsigned int gpio_data; + unsigned int gpio_eapd_hp; /* EAPD GPIO bit for headphones */ + unsigned int gpio_eapd_speaker; /* EAPD GPIO bit for speakers */ struct hda_pcm pcm_rec[2]; /* PCM information */ @@ -76,6 +78,7 @@ enum { CS420X_MBP53, CS420X_MBP55, CS420X_IMAC27, + CS420X_APPLE, CS420X_AUTO, CS420X_MODELS }; @@ -928,10 +931,9 @@ static void cs_automute(struct hda_codec *codec) spdif_present ? 0 : PIN_OUT); } } - if (spec->board_config == CS420X_MBP53 || - spec->board_config == CS420X_MBP55 || - spec->board_config == CS420X_IMAC27) { - unsigned int gpio = hp_present ? 0x02 : 0x08; + if (spec->gpio_eapd_hp) { + unsigned int gpio = hp_present ? + spec->gpio_eapd_hp : spec->gpio_eapd_speaker; snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, gpio); } @@ -1276,6 +1278,7 @@ static const char * const cs420x_models[CS420X_MODELS] = { [CS420X_MBP53] = "mbp53", [CS420X_MBP55] = "mbp55", [CS420X_IMAC27] = "imac27", + [CS420X_IMAC27] = "apple", [CS420X_AUTO] = "auto", }; @@ -1285,7 +1288,13 @@ static const struct snd_pci_quirk cs420x_cfg_tbl[] = { SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55), SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55), - SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), + /* this conflicts with too many other models */ + /*SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),*/ + {} /* terminator */ +}; + +static const struct snd_pci_quirk cs420x_codec_cfg_tbl[] = { + SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), {} /* terminator */ }; @@ -1367,6 +1376,10 @@ static int patch_cs420x(struct hda_codec *codec) spec->board_config = snd_hda_check_board_config(codec, CS420X_MODELS, cs420x_models, cs420x_cfg_tbl); + if (spec->board_config < 0) + spec->board_config = + snd_hda_check_board_codec_sid_config(codec, + CS420X_MODELS, NULL, cs420x_codec_cfg_tbl); if (spec->board_config >= 0) fix_pincfg(codec, spec->board_config, cs_pincfgs); @@ -1374,10 +1387,11 @@ static int patch_cs420x(struct hda_codec *codec) case CS420X_IMAC27: case CS420X_MBP53: case CS420X_MBP55: - /* GPIO1 = headphones */ - /* GPIO3 = speakers */ - spec->gpio_mask = 0x0a; - spec->gpio_dir = 0x0a; + case CS420X_APPLE: + spec->gpio_eapd_hp = 2; /* GPIO1 = headphones */ + spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */ + spec->gpio_mask = spec->gpio_dir = + spec->gpio_eapd_hp | spec->gpio_eapd_speaker; break; } -- cgit v1.2.3 From 6759dc323826c2c806c998cd93945c5476688dd2 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 23 Nov 2011 07:38:59 +0100 Subject: ALSA: hda/realtek - Fix missing inits of item indices for auto-mic When the imux entries are rebuilt in alc_rebuild_imux_for_auto_mic(), the initialization of index field is missing. It may work without it casually when the original imux was created by the auto-parser, but it's definitely broken in the case of static configs where no imux was parsed beforehand. Because of this, the auto-mic switching doesn't work properly on some model options. This patch adds the missing initialization of index field. Reported-by: Dmitry Nezhevenko Cc: [v3.1] Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 336d14eb72af..06c0c12d4fec 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1054,8 +1054,20 @@ static bool alc_rebuild_imux_for_auto_mic(struct hda_codec *codec) spec->imux_pins[2] = spec->dock_mic_pin; for (i = 0; i < 3; i++) { strcpy(imux->items[i].label, texts[i]); - if (spec->imux_pins[i]) + if (spec->imux_pins[i]) { + hda_nid_t pin = spec->imux_pins[i]; + int c; + for (c = 0; c < spec->num_adc_nids; c++) { + hda_nid_t cap = spec->capsrc_nids ? + spec->capsrc_nids[c] : spec->adc_nids[c]; + int idx = get_connection_index(codec, cap, pin); + if (idx >= 0) { + imux->items[i].index = idx; + break; + } + } imux->num_items = i + 1; + } } spec->num_mux_defs = 1; spec->input_mux = imux; -- cgit v1.2.3 From 61071594f64ed12328046f94716d1d744bddc0a1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 23 Nov 2011 07:52:15 +0100 Subject: ALSA: hda/realtek - Minor cleanup Use an inline function for the common pattern for assigning a capsrc. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 06c0c12d4fec..cbde019d3d52 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -277,6 +277,12 @@ static bool alc_dyn_adc_pcm_resetup(struct hda_codec *codec, int cur) return false; } +static inline hda_nid_t get_capsrc(struct alc_spec *spec, int idx) +{ + return spec->capsrc_nids ? + spec->capsrc_nids[idx] : spec->adc_nids[idx]; +} + /* select the given imux item; either unmute exclusively or select the route */ static int alc_mux_select(struct hda_codec *codec, unsigned int adc_idx, unsigned int idx, bool force) @@ -303,8 +309,7 @@ static int alc_mux_select(struct hda_codec *codec, unsigned int adc_idx, adc_idx = spec->dyn_adc_idx[idx]; } - nid = spec->capsrc_nids ? - spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx]; + nid = get_capsrc(spec, adc_idx); /* no selection? */ num_conns = snd_hda_get_conn_list(codec, nid, NULL); @@ -1058,8 +1063,7 @@ static bool alc_rebuild_imux_for_auto_mic(struct hda_codec *codec) hda_nid_t pin = spec->imux_pins[i]; int c; for (c = 0; c < spec->num_adc_nids; c++) { - hda_nid_t cap = spec->capsrc_nids ? - spec->capsrc_nids[c] : spec->adc_nids[c]; + hda_nid_t cap = get_capsrc(spec, c); int idx = get_connection_index(codec, cap, pin); if (idx >= 0) { imux->items[i].index = idx; @@ -1969,10 +1973,8 @@ static int alc_build_controls(struct hda_codec *codec) if (!kctl) kctl = snd_hda_find_mixer_ctl(codec, "Input Source"); for (i = 0; kctl && i < kctl->count; i++) { - const hda_nid_t *nids = spec->capsrc_nids; - if (!nids) - nids = spec->adc_nids; - err = snd_hda_add_nid(codec, kctl, i, nids[i]); + err = snd_hda_add_nid(codec, kctl, i, + get_capsrc(spec, i)); if (err < 0) return err; } @@ -2759,8 +2761,7 @@ static int alc_auto_create_input_ctls(struct hda_codec *codec) } for (c = 0; c < num_adcs; c++) { - hda_nid_t cap = spec->capsrc_nids ? - spec->capsrc_nids[c] : spec->adc_nids[c]; + hda_nid_t cap = get_capsrc(spec, c); idx = get_connection_index(codec, cap, pin); if (idx >= 0) { spec->imux_pins[imux->num_items] = pin; @@ -3706,8 +3707,7 @@ static int init_capsrc_for_pin(struct hda_codec *codec, hda_nid_t pin) if (!pin) return 0; for (i = 0; i < spec->num_adc_nids; i++) { - hda_nid_t cap = spec->capsrc_nids ? - spec->capsrc_nids[i] : spec->adc_nids[i]; + hda_nid_t cap = get_capsrc(spec, i); int idx; idx = get_connection_index(codec, cap, pin); -- cgit v1.2.3 From 92bb43e6aae3dbdb199feba93da5f2d05d7716d0 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 24 Nov 2011 14:48:24 +0300 Subject: ALSA: hda - cut and paste typo in cs420x_models[] The CS420X_IMAC27 was copied from the line before but CS420X_APPLE was clearly intented. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_cirrus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 7bd2a52f2bac..70a7abda7e22 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -1278,7 +1278,7 @@ static const char * const cs420x_models[CS420X_MODELS] = { [CS420X_MBP53] = "mbp53", [CS420X_MBP55] = "mbp55", [CS420X_IMAC27] = "imac27", - [CS420X_IMAC27] = "apple", + [CS420X_APPLE] = "apple", [CS420X_AUTO] = "auto", }; -- cgit v1.2.3 From 187d333edc0a8e1bb507900ce89853ffe3bd2c84 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 24 Nov 2011 16:33:09 +0100 Subject: ALSA: hda - Fix jack-detection control of VT1708 VT1708 has no support for unsolicited events per jack-plug, the driver implements the workq for polling the jack-detection. The mixer element "Jack Detect" was supposed to control this behavior on/off, but this doesn't work properly as is now. The workq is always started and the HP automute is always enabled. This patch fixes the jack-detect control behavior by triggering / stopping the work appropriately at the state change. Also the work checks the internal state to continue scheduling or not. Cc: [v3.1] Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_via.c | 76 +++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 33 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 431c0d417eeb..b5137629f8e9 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -208,6 +208,7 @@ struct via_spec { /* work to check hp jack state */ struct hda_codec *codec; struct delayed_work vt1708_hp_work; + int hp_work_active; int vt1708_jack_detect; int vt1708_hp_present; @@ -305,27 +306,35 @@ enum { static void analog_low_current_mode(struct hda_codec *codec); static bool is_aa_path_mute(struct hda_codec *codec); -static void vt1708_start_hp_work(struct via_spec *spec) +#define hp_detect_with_aa(codec) \ + (snd_hda_get_bool_hint(codec, "analog_loopback_hp_detect") == 1 && \ + !is_aa_path_mute(codec)) + +static void vt1708_stop_hp_work(struct via_spec *spec) { if (spec->codec_type != VT1708 || spec->autocfg.hp_pins[0] == 0) return; - snd_hda_codec_write(spec->codec, 0x1, 0, 0xf81, - !spec->vt1708_jack_detect); - if (!delayed_work_pending(&spec->vt1708_hp_work)) - schedule_delayed_work(&spec->vt1708_hp_work, - msecs_to_jiffies(100)); + if (spec->hp_work_active) { + snd_hda_codec_write(spec->codec, 0x1, 0, 0xf81, 1); + cancel_delayed_work_sync(&spec->vt1708_hp_work); + spec->hp_work_active = 0; + } } -static void vt1708_stop_hp_work(struct via_spec *spec) +static void vt1708_update_hp_work(struct via_spec *spec) { if (spec->codec_type != VT1708 || spec->autocfg.hp_pins[0] == 0) return; - if (snd_hda_get_bool_hint(spec->codec, "analog_loopback_hp_detect") == 1 - && !is_aa_path_mute(spec->codec)) - return; - snd_hda_codec_write(spec->codec, 0x1, 0, 0xf81, - !spec->vt1708_jack_detect); - cancel_delayed_work_sync(&spec->vt1708_hp_work); + if (spec->vt1708_jack_detect && + (spec->active_streams || hp_detect_with_aa(spec->codec))) { + if (!spec->hp_work_active) { + snd_hda_codec_write(spec->codec, 0x1, 0, 0xf81, 0); + schedule_delayed_work(&spec->vt1708_hp_work, + msecs_to_jiffies(100)); + spec->hp_work_active = 1; + } + } else if (!hp_detect_with_aa(spec->codec)) + vt1708_stop_hp_work(spec); } static void set_widgets_power_state(struct hda_codec *codec) @@ -343,12 +352,7 @@ static int analog_input_switch_put(struct snd_kcontrol *kcontrol, set_widgets_power_state(codec); analog_low_current_mode(snd_kcontrol_chip(kcontrol)); - if (snd_hda_get_bool_hint(codec, "analog_loopback_hp_detect") == 1) { - if (is_aa_path_mute(codec)) - vt1708_start_hp_work(codec->spec); - else - vt1708_stop_hp_work(codec->spec); - } + vt1708_update_hp_work(codec->spec); return change; } @@ -1154,7 +1158,7 @@ static int via_playback_multi_pcm_prepare(struct hda_pcm_stream *hinfo, spec->cur_dac_stream_tag = stream_tag; spec->cur_dac_format = format; mutex_unlock(&spec->config_mutex); - vt1708_start_hp_work(spec); + vt1708_update_hp_work(spec); return 0; } @@ -1174,7 +1178,7 @@ static int via_playback_hp_pcm_prepare(struct hda_pcm_stream *hinfo, spec->cur_hp_stream_tag = stream_tag; spec->cur_hp_format = format; mutex_unlock(&spec->config_mutex); - vt1708_start_hp_work(spec); + vt1708_update_hp_work(spec); return 0; } @@ -1188,7 +1192,7 @@ static int via_playback_multi_pcm_cleanup(struct hda_pcm_stream *hinfo, snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); spec->active_streams &= ~STREAM_MULTI_OUT; mutex_unlock(&spec->config_mutex); - vt1708_stop_hp_work(spec); + vt1708_update_hp_work(spec); return 0; } @@ -1203,7 +1207,7 @@ static int via_playback_hp_pcm_cleanup(struct hda_pcm_stream *hinfo, snd_hda_codec_setup_stream(codec, spec->hp_dac_nid, 0, 0, 0); spec->active_streams &= ~STREAM_INDEP_HP; mutex_unlock(&spec->config_mutex); - vt1708_stop_hp_work(spec); + vt1708_update_hp_work(spec); return 0; } @@ -1645,7 +1649,8 @@ static void via_hp_automute(struct hda_codec *codec) int nums; struct via_spec *spec = codec->spec; - if (!spec->hp_independent_mode && spec->autocfg.hp_pins[0]) + if (!spec->hp_independent_mode && spec->autocfg.hp_pins[0] && + (spec->codec_type != VT1708 || spec->vt1708_jack_detect)) present = snd_hda_jack_detect(codec, spec->autocfg.hp_pins[0]); if (spec->smart51_enabled) @@ -2612,8 +2617,6 @@ static int vt1708_jack_detect_get(struct snd_kcontrol *kcontrol, if (spec->codec_type != VT1708) return 0; - spec->vt1708_jack_detect = - !((snd_hda_codec_read(codec, 0x1, 0, 0xf84, 0) >> 8) & 0x1); ucontrol->value.integer.value[0] = spec->vt1708_jack_detect; return 0; } @@ -2623,18 +2626,22 @@ static int vt1708_jack_detect_put(struct snd_kcontrol *kcontrol, { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct via_spec *spec = codec->spec; - int change; + int val; if (spec->codec_type != VT1708) return 0; - spec->vt1708_jack_detect = ucontrol->value.integer.value[0]; - change = (0x1 & (snd_hda_codec_read(codec, 0x1, 0, 0xf84, 0) >> 8)) - == !spec->vt1708_jack_detect; - if (spec->vt1708_jack_detect) { + val = !!ucontrol->value.integer.value[0]; + if (spec->vt1708_jack_detect == val) + return 0; + spec->vt1708_jack_detect = val; + if (spec->vt1708_jack_detect && + snd_hda_get_bool_hint(codec, "analog_loopback_hp_detect") != 1) { mute_aa_path(codec, 1); notify_aa_path_ctls(codec); } - return change; + via_hp_automute(codec); + vt1708_update_hp_work(spec); + return 1; } static const struct snd_kcontrol_new vt1708_jack_detect_ctl = { @@ -2771,6 +2778,7 @@ static int via_init(struct hda_codec *codec) via_auto_init_unsol_event(codec); via_hp_automute(codec); + vt1708_update_hp_work(spec); return 0; } @@ -2787,7 +2795,9 @@ static void vt1708_update_hp_jack_state(struct work_struct *work) spec->vt1708_hp_present ^= 1; via_hp_automute(spec->codec); } - vt1708_start_hp_work(spec); + if (spec->vt1708_jack_detect) + schedule_delayed_work(&spec->vt1708_hp_work, + msecs_to_jiffies(100)); } static int get_mux_nids(struct hda_codec *codec) -- cgit v1.2.3 From 542c9a0a2fa351149c4a3467589a54cafcf0a1dd Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 29 Nov 2011 13:01:30 +0100 Subject: ALSA: hda - Avoid touching mute-VREF pin for IDT codecs Some HP laptops use a pin VREF for controlling the mute LED, and such a pin shouldn't be powered off. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index f3658658548e..f4f4ebeed9ea 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4441,7 +4441,9 @@ static int stac92xx_init(struct hda_codec *codec) int pinctl, def_conf; /* power on when no jack detection is available */ - if (!spec->hp_detect) { + /* or when the VREF is used for controlling LED */ + if (!spec->hp_detect || + (spec->gpio_led > 8 && spec->gpio_led == nid)) { stac_toggle_power_map(codec, nid, 1); continue; } -- cgit v1.2.3 From 4f8b6c7dc80ac9619db033c7f6fc355eab9514f5 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 29 Nov 2011 12:21:17 +0100 Subject: ALSA: hda_intel - revert a quirk that affect VIA chipsets This quirk sould be reverted. It has the following probems: 1) The quirk was intended to "ASUS MV2-MX SE" motherboards only, but the ID used matches a much broader range, potentially all boards containing a VIA chipset model in the family of vendor VIA 0x1106 and audio device ID 0x3288, which encompasses VIA-VT82xx, VIA-VT1xx and VIA-VT20xx chipsets. 2) VIA chipsets rely on azx_via_get_position() to handle correctly dma transfers during capture. Using POS_FIX_LPIB instead of POS_FIX_VIACOMBO leads to partially corrupted input buffers during capture. The effects of this bug are not immediately visible, it took strong DSP expertise, some expensive signal generator and a spectrum analyzer to identify it and verify correct behaviour using original default. 3) It's almost certain that the quirk did not fix the real problem, if there was one. Refer to original submission: http://mailman.alsa-project.org/pipermail/alsa-devel/2010-February/025109.html Signed-of-by: Marc Vertes Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_intel.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 096507d2ca9a..7d98240def0b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2508,7 +2508,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), - SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB), SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB), SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), -- cgit v1.2.3 From 88d686027bb43f585914c77dd363f6e817b42c2a Mon Sep 17 00:00:00 2001 From: Charles Chin Date: Thu, 1 Dec 2011 11:21:00 +0100 Subject: ALSA: hda - Fix S3/S4 problem on machines with VREF-pin mute-LED The verb command in stac92xx_post_suspend caused the audio to stop working after resuming from S3 mode on HP laptops with the VREF-pin mute-LED control. Removing relevant post_suspend registering. Although removing D3 on AFG is no optimal solution, the impact should be small in comparison with the broken S3/S4. Signed-off-by: Charles Chin Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'sound/pci/hda') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index f4f4ebeed9ea..d8d2f9dccd9b 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -5057,20 +5057,6 @@ static int stac92xx_pre_resume(struct hda_codec *codec) return 0; } -static int stac92xx_post_suspend(struct hda_codec *codec) -{ - struct sigmatel_spec *spec = codec->spec; - if (spec->gpio_led > 8) { - /* with vref-out pin used for mute led control - * codec AFG is prevented from D3 state, but on - * system suspend it can (and should) be used - */ - snd_hda_codec_read(codec, codec->afg, 0, - AC_VERB_SET_POWER_STATE, AC_PWRST_D3); - } - return 0; -} - static void stac92xx_set_power_state(struct hda_codec *codec, hda_nid_t fg, unsigned int power_state) { @@ -5670,8 +5656,6 @@ again: } else { codec->patch_ops.set_power_state = stac92xx_set_power_state; - codec->patch_ops.post_suspend = - stac92xx_post_suspend; } codec->patch_ops.pre_resume = stac92xx_pre_resume; codec->patch_ops.check_power_status = @@ -5985,8 +5969,6 @@ again: } else { codec->patch_ops.set_power_state = stac92xx_set_power_state; - codec->patch_ops.post_suspend = - stac92xx_post_suspend; } codec->patch_ops.pre_resume = stac92xx_pre_resume; codec->patch_ops.check_power_status = -- cgit v1.2.3