aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-11 14:07:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-11 14:07:38 -0400
commita1ada086062101533eb0f841d3884137688091ec (patch)
tree3dd45239db0eaaf7693e5bae75f0c8b61466bb6e
parent39f86a608a3e0f0164bd1540acf87696cfdfb5bb (diff)
parentfae3d88a5c56c3f836e95c4516da883a48612437 (diff)
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: - A series of fixes for Conexant 20549 HD-audio codec chip - A workaround for HDMI hotplug debug prints that annoyed people - A fix for the new support of platform DAPM contexts - Many driver-specific minor fixes * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - hide HDMI/ELD printks unless snd.debug=2 ALSA: sound/isa/sscape.c: add missing resource-release code sound: sound/oss/msnd_pinnacle.c: add vfrees ALSA: hda - clean up CX20549 test mixer setup ALSA: hda - CX20549 doesn't need pin_amp_workaround. ALSA: hda - Remove CD control from model=benq for CX20549 ALSA: hda - fix record volume controls of CX20459 ("Venice") ALSA: hda - Rename capture sources of CX20549 to match common conventions ALSA: hda - Fix proc output for ADC amp values of CX20549 ASoC: tegra: fix i2s compilation when !CONFIG_DEBUG_FS ASoC: set idle_bias_off=1 for all platform DAPM contexts ASoC: imx-audmux: Check for NULL pointer ASoC: imx-audmux: Fix ssi port numbers in sysfs ASoC: ak4642: fixup: mute needs +1 step MAINTAINERS: Don't list everyone working on Wolfson drivers MAINTAINERS: Add missing ASoC OMAP co-maintainer ASoC: pxa: pxa2xx-i2s: add io.h for IOMEM macro ASoC: tegra: ensure clocks are enabled when touching registers ASoC: sgtl5000: Enable VAG when DAC/ADC up ALSA: asihpi - fix return value of hpios_locked_mem_alloc()
-rw-r--r--MAINTAINERS4
-rw-r--r--include/sound/core.h10
-rw-r--r--sound/isa/sscape.c6
-rw-r--r--sound/oss/msnd_pinnacle.c8
-rw-r--r--sound/pci/asihpi/hpi_internal.h4
-rw-r--r--sound/pci/asihpi/hpios.c10
-rw-r--r--sound/pci/hda/hda_codec.h3
-rw-r--r--sound/pci/hda/hda_eld.c6
-rw-r--r--sound/pci/hda/hda_proc.c13
-rw-r--r--sound/pci/hda/patch_conexant.c108
-rw-r--r--sound/pci/hda/patch_hdmi.c9
-rw-r--r--sound/soc/codecs/ak4642.c2
-rw-r--r--sound/soc/codecs/sgtl5000.c25
-rw-r--r--sound/soc/imx/imx-audmux.c5
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c1
-rw-r--r--sound/soc/soc-core.c2
-rw-r--r--sound/soc/tegra/tegra_i2s.c6
-rw-r--r--sound/soc/tegra/tegra_spdif.c4
18 files changed, 120 insertions, 106 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 2dcfca850639..a1270978eb41 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4803,6 +4803,7 @@ F: arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
4803F: arch/arm/mach-omap2/clockdomain44xx.c 4803F: arch/arm/mach-omap2/clockdomain44xx.c
4804 4804
4805OMAP AUDIO SUPPORT 4805OMAP AUDIO SUPPORT
4806M: Peter Ujfalusi <peter.ujfalusi@ti.com>
4806M: Jarkko Nikula <jarkko.nikula@bitmer.com> 4807M: Jarkko Nikula <jarkko.nikula@bitmer.com>
4807L: alsa-devel@alsa-project.org (subscribers-only) 4808L: alsa-devel@alsa-project.org (subscribers-only)
4808L: linux-omap@vger.kernel.org 4809L: linux-omap@vger.kernel.org
@@ -7461,8 +7462,7 @@ F: include/linux/wm97xx.h
7461 7462
7462WOLFSON MICROELECTRONICS DRIVERS 7463WOLFSON MICROELECTRONICS DRIVERS
7463M: Mark Brown <broonie@opensource.wolfsonmicro.com> 7464M: Mark Brown <broonie@opensource.wolfsonmicro.com>
7464M: Ian Lartey <ian@opensource.wolfsonmicro.com> 7465L: patches@opensource.wolfsonmicro.com
7465M: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
7466T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc 7466T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc
7467T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus 7467T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
7468W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices 7468W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
diff --git a/include/sound/core.h b/include/sound/core.h
index b6e0f57d451d..bc056687f647 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -325,6 +325,13 @@ void release_and_free_resource(struct resource *res);
325 325
326/* --- */ 326/* --- */
327 327
328/* sound printk debug levels */
329enum {
330 SND_PR_ALWAYS,
331 SND_PR_DEBUG,
332 SND_PR_VERBOSE,
333};
334
328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) 335#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
329__printf(4, 5) 336__printf(4, 5)
330void __snd_printk(unsigned int level, const char *file, int line, 337void __snd_printk(unsigned int level, const char *file, int line,
@@ -354,6 +361,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
354 */ 361 */
355#define snd_printd(fmt, args...) \ 362#define snd_printd(fmt, args...) \
356 __snd_printk(1, __FILE__, __LINE__, fmt, ##args) 363 __snd_printk(1, __FILE__, __LINE__, fmt, ##args)
364#define _snd_printd(level, fmt, args...) \
365 __snd_printk(level, __FILE__, __LINE__, fmt, ##args)
357 366
358/** 367/**
359 * snd_BUG - give a BUG warning message and stack trace 368 * snd_BUG - give a BUG warning message and stack trace
@@ -383,6 +392,7 @@ void __snd_printk(unsigned int level, const char *file, int line,
383#else /* !CONFIG_SND_DEBUG */ 392#else /* !CONFIG_SND_DEBUG */
384 393
385#define snd_printd(fmt, args...) do { } while (0) 394#define snd_printd(fmt, args...) do { } while (0)
395#define _snd_printd(level, fmt, args...) do { } while (0)
386#define snd_BUG() do { } while (0) 396#define snd_BUG() do { } while (0)
387static inline int __snd_bug_on(int cond) 397static inline int __snd_bug_on(int cond)
388{ 398{
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index b4a6aa960f4b..8490f59709bb 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -1019,13 +1019,15 @@ static int __devinit create_sscape(int dev, struct snd_card *card)
1019 irq_cfg = get_irq_config(sscape->type, irq[dev]); 1019 irq_cfg = get_irq_config(sscape->type, irq[dev]);
1020 if (irq_cfg == INVALID_IRQ) { 1020 if (irq_cfg == INVALID_IRQ) {
1021 snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", irq[dev]); 1021 snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", irq[dev]);
1022 return -ENXIO; 1022 err = -ENXIO;
1023 goto _release_dma;
1023 } 1024 }
1024 1025
1025 mpu_irq_cfg = get_irq_config(sscape->type, mpu_irq[dev]); 1026 mpu_irq_cfg = get_irq_config(sscape->type, mpu_irq[dev]);
1026 if (mpu_irq_cfg == INVALID_IRQ) { 1027 if (mpu_irq_cfg == INVALID_IRQ) {
1027 snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", mpu_irq[dev]); 1028 snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", mpu_irq[dev]);
1028 return -ENXIO; 1029 err = -ENXIO;
1030 goto _release_dma;
1029 } 1031 }
1030 1032
1031 /* 1033 /*
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
index 2c79d60a725f..536c4c0514d3 100644
--- a/sound/oss/msnd_pinnacle.c
+++ b/sound/oss/msnd_pinnacle.c
@@ -1294,6 +1294,8 @@ static int __init calibrate_adc(WORD srate)
1294 1294
1295static int upload_dsp_code(void) 1295static int upload_dsp_code(void)
1296{ 1296{
1297 int ret = 0;
1298
1297 msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); 1299 msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS);
1298#ifndef HAVE_DSPCODEH 1300#ifndef HAVE_DSPCODEH
1299 INITCODESIZE = mod_firmware_load(INITCODEFILE, &INITCODE); 1301 INITCODESIZE = mod_firmware_load(INITCODEFILE, &INITCODE);
@@ -1312,7 +1314,8 @@ static int upload_dsp_code(void)
1312 memcpy_toio(dev.base, PERMCODE, PERMCODESIZE); 1314 memcpy_toio(dev.base, PERMCODE, PERMCODESIZE);
1313 if (msnd_upload_host(&dev, INITCODE, INITCODESIZE) < 0) { 1315 if (msnd_upload_host(&dev, INITCODE, INITCODESIZE) < 0) {
1314 printk(KERN_WARNING LOGNAME ": Error uploading to DSP\n"); 1316 printk(KERN_WARNING LOGNAME ": Error uploading to DSP\n");
1315 return -ENODEV; 1317 ret = -ENODEV;
1318 goto out;
1316 } 1319 }
1317#ifdef HAVE_DSPCODEH 1320#ifdef HAVE_DSPCODEH
1318 printk(KERN_INFO LOGNAME ": DSP firmware uploaded (resident)\n"); 1321 printk(KERN_INFO LOGNAME ": DSP firmware uploaded (resident)\n");
@@ -1320,12 +1323,13 @@ static int upload_dsp_code(void)
1320 printk(KERN_INFO LOGNAME ": DSP firmware uploaded\n"); 1323 printk(KERN_INFO LOGNAME ": DSP firmware uploaded\n");
1321#endif 1324#endif
1322 1325
1326out:
1323#ifndef HAVE_DSPCODEH 1327#ifndef HAVE_DSPCODEH
1324 vfree(INITCODE); 1328 vfree(INITCODE);
1325 vfree(PERMCODE); 1329 vfree(PERMCODE);
1326#endif 1330#endif
1327 1331
1328 return 0; 1332 return ret;
1329} 1333}
1330 1334
1331#ifdef MSND_CLASSIC 1335#ifdef MSND_CLASSIC
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h
index 8c63200cf339..bc86cb726d79 100644
--- a/sound/pci/asihpi/hpi_internal.h
+++ b/sound/pci/asihpi/hpi_internal.h
@@ -1,7 +1,7 @@
1/****************************************************************************** 1/******************************************************************************
2 2
3 AudioScience HPI driver 3 AudioScience HPI driver
4 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 4 Copyright (C) 1997-2012 AudioScience Inc. <support@audioscience.com>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of version 2 of the GNU General Public License as 7 it under the terms of version 2 of the GNU General Public License as
@@ -42,7 +42,7 @@ On error *pLockedMemHandle marked invalid, non-zero returned.
42If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and 42If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and
43HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle. 43HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle.
44*/ 44*/
45int hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle, 45u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
46 /**< memory handle */ 46 /**< memory handle */
47 u32 size, /**< Size in bytes to allocate */ 47 u32 size, /**< Size in bytes to allocate */
48 struct pci_dev *p_os_reference 48 struct pci_dev *p_os_reference
diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c
index 87f4385fe8c7..5ef4fe964366 100644
--- a/sound/pci/asihpi/hpios.c
+++ b/sound/pci/asihpi/hpios.c
@@ -1,7 +1,7 @@
1/****************************************************************************** 1/******************************************************************************
2 2
3 AudioScience HPI driver 3 AudioScience HPI driver
4 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 4 Copyright (C) 1997-2012 AudioScience Inc. <support@audioscience.com>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of version 2 of the GNU General Public License as 7 it under the terms of version 2 of the GNU General Public License as
@@ -39,11 +39,11 @@ void hpios_delay_micro_seconds(u32 num_micro_sec)
39 39
40} 40}
41 41
42/** Allocated an area of locked memory for bus master DMA operations. 42/** Allocate an area of locked memory for bus master DMA operations.
43 43
44On error, return -ENOMEM, and *pMemArea.size = 0 44If allocation fails, return 1, and *pMemArea.size = 0
45*/ 45*/
46int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size, 46u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
47 struct pci_dev *pdev) 47 struct pci_dev *pdev)
48{ 48{
49 /*?? any benefit in using managed dmam_alloc_coherent? */ 49 /*?? any benefit in using managed dmam_alloc_coherent? */
@@ -62,7 +62,7 @@ int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
62 HPI_DEBUG_LOG(WARNING, 62 HPI_DEBUG_LOG(WARNING,
63 "failed to allocate %d bytes locked memory\n", size); 63 "failed to allocate %d bytes locked memory\n", size);
64 p_mem_area->size = 0; 64 p_mem_area->size = 0;
65 return -ENOMEM; 65 return 1;
66 } 66 }
67} 67}
68 68
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 9a9f372e1be4..56b4f74c0b13 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -851,6 +851,9 @@ struct hda_codec {
851 unsigned int pin_amp_workaround:1; /* pin out-amp takes index 851 unsigned int pin_amp_workaround:1; /* pin out-amp takes index
852 * (e.g. Conexant codecs) 852 * (e.g. Conexant codecs)
853 */ 853 */
854 unsigned int single_adc_amp:1; /* adc in-amp takes no index
855 * (e.g. CX20549 codec)
856 */
854 unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */ 857 unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */
855 unsigned int pins_shutup:1; /* pins are shut up */ 858 unsigned int pins_shutup:1; /* pins are shut up */
856 unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ 859 unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index b58b4b1687fa..4c054f4486b9 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -418,7 +418,7 @@ static void hdmi_show_short_audio_desc(struct cea_sad *a)
418 else 418 else
419 buf2[0] = '\0'; 419 buf2[0] = '\0';
420 420
421 printk(KERN_INFO "HDMI: supports coding type %s:" 421 _snd_printd(SND_PR_VERBOSE, "HDMI: supports coding type %s:"
422 " channels = %d, rates =%s%s\n", 422 " channels = %d, rates =%s%s\n",
423 cea_audio_coding_type_names[a->format], 423 cea_audio_coding_type_names[a->format],
424 a->channels, 424 a->channels,
@@ -442,14 +442,14 @@ void snd_hdmi_show_eld(struct hdmi_eld *e)
442{ 442{
443 int i; 443 int i;
444 444
445 printk(KERN_INFO "HDMI: detected monitor %s at connection type %s\n", 445 _snd_printd(SND_PR_VERBOSE, "HDMI: detected monitor %s at connection type %s\n",
446 e->monitor_name, 446 e->monitor_name,
447 eld_connection_type_names[e->conn_type]); 447 eld_connection_type_names[e->conn_type]);
448 448
449 if (e->spk_alloc) { 449 if (e->spk_alloc) {
450 char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE]; 450 char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE];
451 snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf)); 451 snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf));
452 printk(KERN_INFO "HDMI: available speakers:%s\n", buf); 452 _snd_printd(SND_PR_VERBOSE, "HDMI: available speakers:%s\n", buf);
453 } 453 }
454 454
455 for (i = 0; i < e->sad_count; i++) 455 for (i = 0; i < e->sad_count; i++)
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 254ab5204603..e59e2f059b6e 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -651,9 +651,16 @@ static void print_codec_info(struct snd_info_entry *entry,
651 snd_iprintf(buffer, " Amp-In caps: "); 651 snd_iprintf(buffer, " Amp-In caps: ");
652 print_amp_caps(buffer, codec, nid, HDA_INPUT); 652 print_amp_caps(buffer, codec, nid, HDA_INPUT);
653 snd_iprintf(buffer, " Amp-In vals: "); 653 snd_iprintf(buffer, " Amp-In vals: ");
654 print_amp_vals(buffer, codec, nid, HDA_INPUT, 654 if (wid_type == AC_WID_PIN ||
655 wid_caps & AC_WCAP_STEREO, 655 (codec->single_adc_amp &&
656 wid_type == AC_WID_PIN ? 1 : conn_len); 656 wid_type == AC_WID_AUD_IN))
657 print_amp_vals(buffer, codec, nid, HDA_INPUT,
658 wid_caps & AC_WCAP_STEREO,
659 1);
660 else
661 print_amp_vals(buffer, codec, nid, HDA_INPUT,
662 wid_caps & AC_WCAP_STEREO,
663 conn_len);
657 } 664 }
658 if (wid_caps & AC_WCAP_OUT_AMP) { 665 if (wid_caps & AC_WCAP_OUT_AMP) {
659 snd_iprintf(buffer, " Amp-Out caps: "); 666 snd_iprintf(buffer, " Amp-Out caps: ");
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 8c6523bbc797..a36488d94aaa 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -141,7 +141,6 @@ struct conexant_spec {
141 unsigned int hp_laptop:1; 141 unsigned int hp_laptop:1;
142 unsigned int asus:1; 142 unsigned int asus:1;
143 unsigned int pin_eapd_ctrls:1; 143 unsigned int pin_eapd_ctrls:1;
144 unsigned int single_adc_amp:1;
145 144
146 unsigned int adc_switching:1; 145 unsigned int adc_switching:1;
147 146
@@ -687,27 +686,26 @@ static const struct hda_channel_mode cxt5045_modes[1] = {
687static const struct hda_input_mux cxt5045_capture_source = { 686static const struct hda_input_mux cxt5045_capture_source = {
688 .num_items = 2, 687 .num_items = 2,
689 .items = { 688 .items = {
690 { "IntMic", 0x1 }, 689 { "Internal Mic", 0x1 },
691 { "ExtMic", 0x2 }, 690 { "Mic", 0x2 },
692 } 691 }
693}; 692};
694 693
695static const struct hda_input_mux cxt5045_capture_source_benq = { 694static const struct hda_input_mux cxt5045_capture_source_benq = {
696 .num_items = 5, 695 .num_items = 4,
697 .items = { 696 .items = {
698 { "IntMic", 0x1 }, 697 { "Internal Mic", 0x1 },
699 { "ExtMic", 0x2 }, 698 { "Mic", 0x2 },
700 { "LineIn", 0x3 }, 699 { "Line", 0x3 },
701 { "CD", 0x4 }, 700 { "Mixer", 0x0 },
702 { "Mixer", 0x0 },
703 } 701 }
704}; 702};
705 703
706static const struct hda_input_mux cxt5045_capture_source_hp530 = { 704static const struct hda_input_mux cxt5045_capture_source_hp530 = {
707 .num_items = 2, 705 .num_items = 2,
708 .items = { 706 .items = {
709 { "ExtMic", 0x1 }, 707 { "Mic", 0x1 },
710 { "IntMic", 0x2 }, 708 { "Internal Mic", 0x2 },
711 } 709 }
712}; 710};
713 711
@@ -798,10 +796,8 @@ static void cxt5045_hp_unsol_event(struct hda_codec *codec,
798} 796}
799 797
800static const struct snd_kcontrol_new cxt5045_mixers[] = { 798static const struct snd_kcontrol_new cxt5045_mixers[] = {
801 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), 799 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x00, HDA_INPUT),
802 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), 800 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
803 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x02, HDA_INPUT),
804 HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x02, HDA_INPUT),
805 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), 801 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT),
806 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), 802 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT),
807 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x1, HDA_INPUT), 803 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x1, HDA_INPUT),
@@ -822,27 +818,15 @@ static const struct snd_kcontrol_new cxt5045_mixers[] = {
822}; 818};
823 819
824static const struct snd_kcontrol_new cxt5045_benq_mixers[] = { 820static const struct snd_kcontrol_new cxt5045_benq_mixers[] = {
825 HDA_CODEC_VOLUME("CD Capture Volume", 0x1a, 0x04, HDA_INPUT), 821 HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x3, HDA_INPUT),
826 HDA_CODEC_MUTE("CD Capture Switch", 0x1a, 0x04, HDA_INPUT), 822 HDA_CODEC_MUTE("Line Playback Switch", 0x17, 0x3, HDA_INPUT),
827 HDA_CODEC_VOLUME("CD Playback Volume", 0x17, 0x4, HDA_INPUT),
828 HDA_CODEC_MUTE("CD Playback Switch", 0x17, 0x4, HDA_INPUT),
829
830 HDA_CODEC_VOLUME("Line In Capture Volume", 0x1a, 0x03, HDA_INPUT),
831 HDA_CODEC_MUTE("Line In Capture Switch", 0x1a, 0x03, HDA_INPUT),
832 HDA_CODEC_VOLUME("Line In Playback Volume", 0x17, 0x3, HDA_INPUT),
833 HDA_CODEC_MUTE("Line In Playback Switch", 0x17, 0x3, HDA_INPUT),
834
835 HDA_CODEC_VOLUME("Mixer Capture Volume", 0x1a, 0x0, HDA_INPUT),
836 HDA_CODEC_MUTE("Mixer Capture Switch", 0x1a, 0x0, HDA_INPUT),
837 823
838 {} 824 {}
839}; 825};
840 826
841static const struct snd_kcontrol_new cxt5045_mixers_hp530[] = { 827static const struct snd_kcontrol_new cxt5045_mixers_hp530[] = {
842 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), 828 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x00, HDA_INPUT),
843 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), 829 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
844 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x01, HDA_INPUT),
845 HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x01, HDA_INPUT),
846 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), 830 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT),
847 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), 831 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT),
848 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x2, HDA_INPUT), 832 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x2, HDA_INPUT),
@@ -946,10 +930,10 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
946 /* Output controls */ 930 /* Output controls */
947 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT), 931 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT),
948 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT), 932 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT),
949 HDA_CODEC_VOLUME("Node 11 Playback Volume", 0x11, 0x0, HDA_OUTPUT), 933 HDA_CODEC_VOLUME("HP-OUT Playback Volume", 0x11, 0x0, HDA_OUTPUT),
950 HDA_CODEC_MUTE("Node 11 Playback Switch", 0x11, 0x0, HDA_OUTPUT), 934 HDA_CODEC_MUTE("HP-OUT Playback Switch", 0x11, 0x0, HDA_OUTPUT),
951 HDA_CODEC_VOLUME("Node 12 Playback Volume", 0x12, 0x0, HDA_OUTPUT), 935 HDA_CODEC_VOLUME("LINE1 Playback Volume", 0x12, 0x0, HDA_OUTPUT),
952 HDA_CODEC_MUTE("Node 12 Playback Switch", 0x12, 0x0, HDA_OUTPUT), 936 HDA_CODEC_MUTE("LINE1 Playback Switch", 0x12, 0x0, HDA_OUTPUT),
953 937
954 /* Modes for retasking pin widgets */ 938 /* Modes for retasking pin widgets */
955 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT), 939 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT),
@@ -960,16 +944,16 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
960 944
961 /* Loopback mixer controls */ 945 /* Loopback mixer controls */
962 946
963 HDA_CODEC_VOLUME("Mixer-1 Volume", 0x17, 0x0, HDA_INPUT), 947 HDA_CODEC_VOLUME("PCM Volume", 0x17, 0x0, HDA_INPUT),
964 HDA_CODEC_MUTE("Mixer-1 Switch", 0x17, 0x0, HDA_INPUT), 948 HDA_CODEC_MUTE("PCM Switch", 0x17, 0x0, HDA_INPUT),
965 HDA_CODEC_VOLUME("Mixer-2 Volume", 0x17, 0x1, HDA_INPUT), 949 HDA_CODEC_VOLUME("MIC1 pin Volume", 0x17, 0x1, HDA_INPUT),
966 HDA_CODEC_MUTE("Mixer-2 Switch", 0x17, 0x1, HDA_INPUT), 950 HDA_CODEC_MUTE("MIC1 pin Switch", 0x17, 0x1, HDA_INPUT),
967 HDA_CODEC_VOLUME("Mixer-3 Volume", 0x17, 0x2, HDA_INPUT), 951 HDA_CODEC_VOLUME("LINE1 pin Volume", 0x17, 0x2, HDA_INPUT),
968 HDA_CODEC_MUTE("Mixer-3 Switch", 0x17, 0x2, HDA_INPUT), 952 HDA_CODEC_MUTE("LINE1 pin Switch", 0x17, 0x2, HDA_INPUT),
969 HDA_CODEC_VOLUME("Mixer-4 Volume", 0x17, 0x3, HDA_INPUT), 953 HDA_CODEC_VOLUME("HP-OUT pin Volume", 0x17, 0x3, HDA_INPUT),
970 HDA_CODEC_MUTE("Mixer-4 Switch", 0x17, 0x3, HDA_INPUT), 954 HDA_CODEC_MUTE("HP-OUT pin Switch", 0x17, 0x3, HDA_INPUT),
971 HDA_CODEC_VOLUME("Mixer-5 Volume", 0x17, 0x4, HDA_INPUT), 955 HDA_CODEC_VOLUME("CD pin Volume", 0x17, 0x4, HDA_INPUT),
972 HDA_CODEC_MUTE("Mixer-5 Switch", 0x17, 0x4, HDA_INPUT), 956 HDA_CODEC_MUTE("CD pin Switch", 0x17, 0x4, HDA_INPUT),
973 { 957 {
974 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 958 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
975 .name = "Input Source", 959 .name = "Input Source",
@@ -978,16 +962,8 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
978 .put = conexant_mux_enum_put, 962 .put = conexant_mux_enum_put,
979 }, 963 },
980 /* Audio input controls */ 964 /* Audio input controls */
981 HDA_CODEC_VOLUME("Input-1 Volume", 0x1a, 0x0, HDA_INPUT), 965 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x0, HDA_INPUT),
982 HDA_CODEC_MUTE("Input-1 Switch", 0x1a, 0x0, HDA_INPUT), 966 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
983 HDA_CODEC_VOLUME("Input-2 Volume", 0x1a, 0x1, HDA_INPUT),
984 HDA_CODEC_MUTE("Input-2 Switch", 0x1a, 0x1, HDA_INPUT),
985 HDA_CODEC_VOLUME("Input-3 Volume", 0x1a, 0x2, HDA_INPUT),
986 HDA_CODEC_MUTE("Input-3 Switch", 0x1a, 0x2, HDA_INPUT),
987 HDA_CODEC_VOLUME("Input-4 Volume", 0x1a, 0x3, HDA_INPUT),
988 HDA_CODEC_MUTE("Input-4 Switch", 0x1a, 0x3, HDA_INPUT),
989 HDA_CODEC_VOLUME("Input-5 Volume", 0x1a, 0x4, HDA_INPUT),
990 HDA_CODEC_MUTE("Input-5 Switch", 0x1a, 0x4, HDA_INPUT),
991 { } /* end */ 967 { } /* end */
992}; 968};
993 969
@@ -1009,10 +985,6 @@ static const struct hda_verb cxt5045_test_init_verbs[] = {
1009 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 985 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1010 {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0}, 986 {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0},
1011 987
1012 /* Start with output sum widgets muted and their output gains at min */
1013 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1014 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1015
1016 /* Unmute retasking pin widget output buffers since the default 988 /* Unmute retasking pin widget output buffers since the default
1017 * state appears to be output. As the pin mode is changed by the 989 * state appears to be output. As the pin mode is changed by the
1018 * user the pin mode control will take care of enabling the pin's 990 * user the pin mode control will take care of enabling the pin's
@@ -1027,11 +999,11 @@ static const struct hda_verb cxt5045_test_init_verbs[] = {
1027 /* Set ADC connection select to match default mixer setting (mic1 999 /* Set ADC connection select to match default mixer setting (mic1
1028 * pin) 1000 * pin)
1029 */ 1001 */
1030 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00}, 1002 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
1031 {0x17, AC_VERB_SET_CONNECT_SEL, 0x00}, 1003 {0x17, AC_VERB_SET_CONNECT_SEL, 0x01},
1032 1004
1033 /* Mute all inputs to mixer widget (even unconnected ones) */ 1005 /* Mute all inputs to mixer widget (even unconnected ones) */
1034 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* Mixer pin */ 1006 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* Mixer */
1035 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* Mic1 pin */ 1007 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* Mic1 pin */
1036 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* Line pin */ 1008 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* Line pin */
1037 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* HP pin */ 1009 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* HP pin */
@@ -1110,7 +1082,7 @@ static int patch_cxt5045(struct hda_codec *codec)
1110 if (!spec) 1082 if (!spec)
1111 return -ENOMEM; 1083 return -ENOMEM;
1112 codec->spec = spec; 1084 codec->spec = spec;
1113 codec->pin_amp_workaround = 1; 1085 codec->single_adc_amp = 1;
1114 1086
1115 spec->multiout.max_channels = 2; 1087 spec->multiout.max_channels = 2;
1116 spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids); 1088 spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids);
@@ -4220,7 +4192,7 @@ static int cx_auto_add_capture_volume(struct hda_codec *codec, hda_nid_t nid,
4220 int idx = get_input_connection(codec, adc_nid, nid); 4192 int idx = get_input_connection(codec, adc_nid, nid);
4221 if (idx < 0) 4193 if (idx < 0)
4222 continue; 4194 continue;
4223 if (spec->single_adc_amp) 4195 if (codec->single_adc_amp)
4224 idx = 0; 4196 idx = 0;
4225 return cx_auto_add_volume_idx(codec, label, pfx, 4197 return cx_auto_add_volume_idx(codec, label, pfx,
4226 cidx, adc_nid, HDA_INPUT, idx); 4198 cidx, adc_nid, HDA_INPUT, idx);
@@ -4275,7 +4247,7 @@ static int cx_auto_build_input_controls(struct hda_codec *codec)
4275 if (cidx < 0) 4247 if (cidx < 0)
4276 continue; 4248 continue;
4277 input_conn[i] = spec->imux_info[i].adc; 4249 input_conn[i] = spec->imux_info[i].adc;
4278 if (!spec->single_adc_amp) 4250 if (!codec->single_adc_amp)
4279 input_conn[i] |= cidx << 8; 4251 input_conn[i] |= cidx << 8;
4280 if (i > 0 && input_conn[i] != input_conn[0]) 4252 if (i > 0 && input_conn[i] != input_conn[0])
4281 multi_connection = 1; 4253 multi_connection = 1;
@@ -4466,15 +4438,17 @@ static int patch_conexant_auto(struct hda_codec *codec)
4466 if (!spec) 4438 if (!spec)
4467 return -ENOMEM; 4439 return -ENOMEM;
4468 codec->spec = spec; 4440 codec->spec = spec;
4469 codec->pin_amp_workaround = 1;
4470 4441
4471 switch (codec->vendor_id) { 4442 switch (codec->vendor_id) {
4472 case 0x14f15045: 4443 case 0x14f15045:
4473 spec->single_adc_amp = 1; 4444 codec->single_adc_amp = 1;
4474 break; 4445 break;
4475 case 0x14f15051: 4446 case 0x14f15051:
4476 add_cx5051_fake_mutes(codec); 4447 add_cx5051_fake_mutes(codec);
4448 codec->pin_amp_workaround = 1;
4477 break; 4449 break;
4450 default:
4451 codec->pin_amp_workaround = 1;
4478 } 4452 }
4479 4453
4480 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); 4454 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 540cd13f7f15..83f345f3c961 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -757,8 +757,6 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
757 struct hdmi_spec *spec = codec->spec; 757 struct hdmi_spec *spec = codec->spec;
758 int tag = res >> AC_UNSOL_RES_TAG_SHIFT; 758 int tag = res >> AC_UNSOL_RES_TAG_SHIFT;
759 int pin_nid; 759 int pin_nid;
760 int pd = !!(res & AC_UNSOL_RES_PD);
761 int eldv = !!(res & AC_UNSOL_RES_ELDV);
762 int pin_idx; 760 int pin_idx;
763 struct hda_jack_tbl *jack; 761 struct hda_jack_tbl *jack;
764 762
@@ -768,9 +766,10 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
768 pin_nid = jack->nid; 766 pin_nid = jack->nid;
769 jack->jack_dirty = 1; 767 jack->jack_dirty = 1;
770 768
771 printk(KERN_INFO 769 _snd_printd(SND_PR_VERBOSE,
772 "HDMI hot plug event: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", 770 "HDMI hot plug event: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n",
773 codec->addr, pin_nid, pd, eldv); 771 codec->addr, pin_nid,
772 !!(res & AC_UNSOL_RES_PD), !!(res & AC_UNSOL_RES_ELDV));
774 773
775 pin_idx = pin_nid_to_pin_index(spec, pin_nid); 774 pin_idx = pin_nid_to_pin_index(spec, pin_nid);
776 if (pin_idx < 0) 775 if (pin_idx < 0)
@@ -992,7 +991,7 @@ static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
992 if (eld->monitor_present) 991 if (eld->monitor_present)
993 eld_valid = !!(present & AC_PINSENSE_ELDV); 992 eld_valid = !!(present & AC_PINSENSE_ELDV);
994 993
995 printk(KERN_INFO 994 _snd_printd(SND_PR_VERBOSE,
996 "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", 995 "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n",
997 codec->addr, pin_nid, eld->monitor_present, eld_valid); 996 codec->addr, pin_nid, eld->monitor_present, eld_valid);
998 997
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index f8e10ced244a..b3e24f289421 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -140,7 +140,7 @@
140 * min : 0xFE : -115.0 dB 140 * min : 0xFE : -115.0 dB
141 * mute: 0xFF 141 * mute: 0xFF
142 */ 142 */
143static const DECLARE_TLV_DB_SCALE(out_tlv, -11500, 50, 1); 143static const DECLARE_TLV_DB_SCALE(out_tlv, -11550, 50, 1);
144 144
145static const struct snd_kcontrol_new ak4642_snd_controls[] = { 145static const struct snd_kcontrol_new ak4642_snd_controls[] = {
146 146
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d1926266fe00..8e92fb88ed09 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -143,11 +143,11 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w,
143} 143}
144 144
145/* 145/*
146 * using codec assist to small pop, hp_powerup or lineout_powerup 146 * As manual described, ADC/DAC only works when VAG powerup,
147 * should stay setting until vag_powerup is fully ramped down, 147 * So enabled VAG before ADC/DAC up.
148 * vag fully ramped down require 400ms. 148 * In power down case, we need wait 400ms when vag fully ramped down.
149 */ 149 */
150static int small_pop_event(struct snd_soc_dapm_widget *w, 150static int power_vag_event(struct snd_soc_dapm_widget *w,
151 struct snd_kcontrol *kcontrol, int event) 151 struct snd_kcontrol *kcontrol, int event)
152{ 152{
153 switch (event) { 153 switch (event) {
@@ -156,7 +156,7 @@ static int small_pop_event(struct snd_soc_dapm_widget *w,
156 SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP); 156 SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
157 break; 157 break;
158 158
159 case SND_SOC_DAPM_PRE_PMD: 159 case SND_SOC_DAPM_POST_PMD:
160 snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, 160 snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
161 SGTL5000_VAG_POWERUP, 0); 161 SGTL5000_VAG_POWERUP, 0);
162 msleep(400); 162 msleep(400);
@@ -201,12 +201,8 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
201 mic_bias_event, 201 mic_bias_event,
202 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), 202 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
203 203
204 SND_SOC_DAPM_PGA_E("HP", SGTL5000_CHIP_ANA_POWER, 4, 0, NULL, 0, 204 SND_SOC_DAPM_PGA("HP", SGTL5000_CHIP_ANA_POWER, 4, 0, NULL, 0),
205 small_pop_event, 205 SND_SOC_DAPM_PGA("LO", SGTL5000_CHIP_ANA_POWER, 0, 0, NULL, 0),
206 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD),
207 SND_SOC_DAPM_PGA_E("LO", SGTL5000_CHIP_ANA_POWER, 0, 0, NULL, 0,
208 small_pop_event,
209 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD),
210 206
211 SND_SOC_DAPM_MUX("Capture Mux", SND_SOC_NOPM, 0, 0, &adc_mux), 207 SND_SOC_DAPM_MUX("Capture Mux", SND_SOC_NOPM, 0, 0, &adc_mux),
212 SND_SOC_DAPM_MUX("Headphone Mux", SND_SOC_NOPM, 0, 0, &dac_mux), 208 SND_SOC_DAPM_MUX("Headphone Mux", SND_SOC_NOPM, 0, 0, &dac_mux),
@@ -221,8 +217,11 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
221 0, SGTL5000_CHIP_DIG_POWER, 217 0, SGTL5000_CHIP_DIG_POWER,
222 1, 0), 218 1, 0),
223 219
224 SND_SOC_DAPM_ADC("ADC", "Capture", SGTL5000_CHIP_ANA_POWER, 1, 0), 220 SND_SOC_DAPM_SUPPLY("VAG_POWER", SGTL5000_CHIP_ANA_POWER, 7, 0,
221 power_vag_event,
222 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
225 223
224 SND_SOC_DAPM_ADC("ADC", "Capture", SGTL5000_CHIP_ANA_POWER, 1, 0),
226 SND_SOC_DAPM_DAC("DAC", "Playback", SGTL5000_CHIP_ANA_POWER, 3, 0), 225 SND_SOC_DAPM_DAC("DAC", "Playback", SGTL5000_CHIP_ANA_POWER, 3, 0),
227}; 226};
228 227
@@ -231,9 +230,11 @@ static const struct snd_soc_dapm_route sgtl5000_dapm_routes[] = {
231 {"Capture Mux", "LINE_IN", "LINE_IN"}, /* line_in --> adc_mux */ 230 {"Capture Mux", "LINE_IN", "LINE_IN"}, /* line_in --> adc_mux */
232 {"Capture Mux", "MIC_IN", "MIC_IN"}, /* mic_in --> adc_mux */ 231 {"Capture Mux", "MIC_IN", "MIC_IN"}, /* mic_in --> adc_mux */
233 232
233 {"ADC", NULL, "VAG_POWER"},
234 {"ADC", NULL, "Capture Mux"}, /* adc_mux --> adc */ 234 {"ADC", NULL, "Capture Mux"}, /* adc_mux --> adc */
235 {"AIFOUT", NULL, "ADC"}, /* adc --> i2s_out */ 235 {"AIFOUT", NULL, "ADC"}, /* adc --> i2s_out */
236 236
237 {"DAC", NULL, "VAG_POWER"},
237 {"DAC", NULL, "AIFIN"}, /* i2s-->dac,skip audio mux */ 238 {"DAC", NULL, "AIFIN"}, /* i2s-->dac,skip audio mux */
238 {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */ 239 {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */
239 {"LO", NULL, "DAC"}, /* dac --> line_out */ 240 {"LO", NULL, "DAC"}, /* dac --> line_out */
diff --git a/sound/soc/imx/imx-audmux.c b/sound/soc/imx/imx-audmux.c
index 1765a197acb0..f23700359c67 100644
--- a/sound/soc/imx/imx-audmux.c
+++ b/sound/soc/imx/imx-audmux.c
@@ -73,6 +73,9 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
73 if (!buf) 73 if (!buf)
74 return -ENOMEM; 74 return -ENOMEM;
75 75
76 if (!audmux_base)
77 return -ENOSYS;
78
76 if (audmux_clk) 79 if (audmux_clk)
77 clk_prepare_enable(audmux_clk); 80 clk_prepare_enable(audmux_clk);
78 81
@@ -152,7 +155,7 @@ static void __init audmux_debugfs_init(void)
152 return; 155 return;
153 } 156 }
154 157
155 for (i = 1; i < 8; i++) { 158 for (i = 0; i < MX31_AUDMUX_PORT6_SSI_PINS_6 + 1; i++) {
156 snprintf(buf, sizeof(buf), "ssi%d", i); 159 snprintf(buf, sizeof(buf), "ssi%d", i);
157 if (!debugfs_create_file(buf, 0444, audmux_debugfs_root, 160 if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
158 (void *)i, &audmux_debugfs_fops)) 161 (void *)i, &audmux_debugfs_fops))
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 609abd51e55f..d08583790d23 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -17,6 +17,7 @@
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/io.h>
20#include <sound/core.h> 21#include <sound/core.h>
21#include <sound/pcm.h> 22#include <sound/pcm.h>
22#include <sound/initval.h> 23#include <sound/initval.h>
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e19c24ade414..accdcb7d4d9d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1081,6 +1081,8 @@ static int soc_probe_platform(struct snd_soc_card *card,
1081 snd_soc_dapm_new_controls(&platform->dapm, 1081 snd_soc_dapm_new_controls(&platform->dapm,
1082 driver->dapm_widgets, driver->num_dapm_widgets); 1082 driver->dapm_widgets, driver->num_dapm_widgets);
1083 1083
1084 platform->dapm.idle_bias_off = 1;
1085
1084 if (driver->probe) { 1086 if (driver->probe) {
1085 ret = driver->probe(platform); 1087 ret = driver->probe(platform);
1086 if (ret < 0) { 1088 if (ret < 0) {
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c
index 33509de52540..e53349912b2e 100644
--- a/sound/soc/tegra/tegra_i2s.c
+++ b/sound/soc/tegra/tegra_i2s.c
@@ -79,11 +79,15 @@ static int tegra_i2s_show(struct seq_file *s, void *unused)
79 struct tegra_i2s *i2s = s->private; 79 struct tegra_i2s *i2s = s->private;
80 int i; 80 int i;
81 81
82 clk_enable(i2s->clk_i2s);
83
82 for (i = 0; i < ARRAY_SIZE(regs); i++) { 84 for (i = 0; i < ARRAY_SIZE(regs); i++) {
83 u32 val = tegra_i2s_read(i2s, regs[i].offset); 85 u32 val = tegra_i2s_read(i2s, regs[i].offset);
84 seq_printf(s, "%s = %08x\n", regs[i].name, val); 86 seq_printf(s, "%s = %08x\n", regs[i].name, val);
85 } 87 }
86 88
89 clk_disable(i2s->clk_i2s);
90
87 return 0; 91 return 0;
88} 92}
89 93
@@ -112,7 +116,7 @@ static void tegra_i2s_debug_remove(struct tegra_i2s *i2s)
112 debugfs_remove(i2s->debug); 116 debugfs_remove(i2s->debug);
113} 117}
114#else 118#else
115static inline void tegra_i2s_debug_add(struct tegra_i2s *i2s, int id) 119static inline void tegra_i2s_debug_add(struct tegra_i2s *i2s)
116{ 120{
117} 121}
118 122
diff --git a/sound/soc/tegra/tegra_spdif.c b/sound/soc/tegra/tegra_spdif.c
index 475428cf270e..9ff2c601445f 100644
--- a/sound/soc/tegra/tegra_spdif.c
+++ b/sound/soc/tegra/tegra_spdif.c
@@ -79,11 +79,15 @@ static int tegra_spdif_show(struct seq_file *s, void *unused)
79 struct tegra_spdif *spdif = s->private; 79 struct tegra_spdif *spdif = s->private;
80 int i; 80 int i;
81 81
82 clk_enable(spdif->clk_spdif_out);
83
82 for (i = 0; i < ARRAY_SIZE(regs); i++) { 84 for (i = 0; i < ARRAY_SIZE(regs); i++) {
83 u32 val = tegra_spdif_read(spdif, regs[i].offset); 85 u32 val = tegra_spdif_read(spdif, regs[i].offset);
84 seq_printf(s, "%s = %08x\n", regs[i].name, val); 86 seq_printf(s, "%s = %08x\n", regs[i].name, val);
85 } 87 }
86 88
89 clk_disable(spdif->clk_spdif_out);
90
87 return 0; 91 return 0;
88} 92}
89 93