aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-24 04:31:34 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-24 04:31:34 -0400
commite6aa0f07cb5e81a7cbeaf3be6e2101234c2f0d30 (patch)
tree77926550ac0c31b1423bcf193a4ed0ecb7fda2c1 /sound
parentd4738792fb86600b6cb7220459d9c47e819b3580 (diff)
parent72d31053f62c4bc464c2783974926969614a8649 (diff)
Merge commit 'v2.6.27-rc7' into x86/microcode
Diffstat (limited to 'sound')
-rw-r--r--sound/Kconfig4
-rw-r--r--sound/arm/pxa2xx-ac97.c8
-rw-r--r--sound/arm/pxa2xx-pcm.c4
-rw-r--r--sound/arm/sa11xx-uda1341.c4
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c3
-rw-r--r--sound/mips/au1x00.c1
-rw-r--r--sound/oss/vidc.c2
-rw-r--r--sound/oss/vidc_fill.S2
-rw-r--r--sound/oss/waveartist.c2
-rw-r--r--sound/pci/Kconfig2
-rw-r--r--sound/pci/ca0106/ca0106_main.c5
-rw-r--r--sound/pci/hda/hda_intel.c13
-rw-r--r--sound/pci/hda/patch_realtek.c75
-rw-r--r--sound/pci/hda/patch_sigmatel.c5
-rw-r--r--sound/pci/oxygen/hifier.c4
-rw-r--r--sound/pci/oxygen/oxygen.c4
-rw-r--r--sound/pci/oxygen/oxygen_mixer.c5
-rw-r--r--sound/pci/oxygen/virtuoso.c73
-rw-r--r--sound/sh/aica.c2
-rw-r--r--sound/soc/at32/playpaq_wm8510.c4
-rw-r--r--sound/soc/at91/at91-pcm.c4
-rw-r--r--sound/soc/at91/at91-pcm.h2
-rw-r--r--sound/soc/at91/at91-ssc.c6
-rw-r--r--sound/soc/at91/eti_b1_wm8731.c5
-rw-r--r--sound/soc/codecs/ak4535.c11
-rw-r--r--sound/soc/codecs/tlv320aic3x.c11
-rw-r--r--sound/soc/codecs/uda1380.c9
-rw-r--r--sound/soc/codecs/wm8510.c9
-rw-r--r--sound/soc/codecs/wm8731.c11
-rw-r--r--sound/soc/codecs/wm8750.c13
-rw-r--r--sound/soc/codecs/wm8753.c12
-rw-r--r--sound/soc/codecs/wm8990.c21
-rw-r--r--sound/soc/codecs/wm8990.h14
-rw-r--r--sound/soc/codecs/wm9712.c1
-rw-r--r--sound/soc/davinci/davinci-evm.c3
-rw-r--r--sound/soc/fsl/fsl_dma.c242
-rw-r--r--sound/soc/fsl/fsl_ssi.c74
-rw-r--r--sound/soc/omap/n810.c22
-rw-r--r--sound/soc/omap/omap-mcbsp.c6
-rw-r--r--sound/soc/omap/omap-pcm.c2
-rw-r--r--sound/soc/pxa/corgi.c8
-rw-r--r--sound/soc/pxa/e800_wm9712.c6
-rw-r--r--sound/soc/pxa/em-x270.c6
-rw-r--r--sound/soc/pxa/poodle.c16
-rw-r--r--sound/soc/pxa/pxa2xx-ac97.c8
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c48
-rw-r--r--sound/soc/pxa/pxa2xx-pcm.c6
-rw-r--r--sound/soc/pxa/spitz.c10
-rw-r--r--sound/soc/pxa/tosa.c9
-rw-r--r--sound/soc/s3c24xx/neo1973_wm8753.c11
-rw-r--r--sound/soc/s3c24xx/s3c2412-i2s.c8
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c10
-rw-r--r--sound/soc/s3c24xx/s3c24xx-i2s.c10
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c6
-rw-r--r--sound/soc/soc-dapm.c1
55 files changed, 570 insertions, 293 deletions
diff --git a/sound/Kconfig b/sound/Kconfig
index a37bee094eba..8ebf512ced6c 100644
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -91,6 +91,9 @@ endif # SOUND_PRIME
91 91
92endif # !M68K 92endif # !M68K
93 93
94endif # SOUND
95
96# AC97_BUS is used from both sound and ucb1400
94config AC97_BUS 97config AC97_BUS
95 tristate 98 tristate
96 help 99 help
@@ -99,4 +102,3 @@ config AC97_BUS
99 sound although they're sharing the AC97 bus. Concerned drivers 102 sound although they're sharing the AC97 bus. Concerned drivers
100 should "select" this. 103 should "select" this.
101 104
102endif # SOUND
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 5b3274b465eb..199cca3366df 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <linux/mutex.h> 28#include <linux/mutex.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/pxa-regs.h> 30#include <mach/pxa-regs.h>
31#include <asm/arch/pxa2xx-gpio.h> 31#include <mach/pxa2xx-gpio.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
35 35
diff --git a/sound/arm/pxa2xx-pcm.c b/sound/arm/pxa2xx-pcm.c
index 0ede9e4656a8..381094aab235 100644
--- a/sound/arm/pxa2xx-pcm.c
+++ b/sound/arm/pxa2xx-pcm.c
@@ -21,8 +21,8 @@
21#include <sound/pcm_params.h> 21#include <sound/pcm_params.h>
22 22
23#include <asm/dma.h> 23#include <asm/dma.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26 26
27#include "pxa2xx-pcm.h" 27#include "pxa2xx-pcm.h"
28 28
diff --git a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c
index faeddf3ecedb..b9c51bf8cd71 100644
--- a/sound/arm/sa11xx-uda1341.c
+++ b/sound/arm/sa11xx-uda1341.c
@@ -71,8 +71,8 @@
71#include <linux/pm.h> 71#include <linux/pm.h>
72#endif 72#endif
73 73
74#include <asm/hardware.h> 74#include <mach/hardware.h>
75#include <asm/arch/h3600.h> 75#include <mach/h3600.h>
76#include <asm/mach-types.h> 76#include <asm/mach-types.h>
77#include <asm/dma.h> 77#include <asm/dma.h>
78 78
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 558dadbf45f1..e024e4588b82 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -604,6 +604,9 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
604{ 604{
605 struct seq_oss_synth *rec; 605 struct seq_oss_synth *rec;
606 606
607 if (dev < 0 || dev >= dp->max_synthdev)
608 return -ENXIO;
609
607 if (dp->synths[dev].is_midi) { 610 if (dp->synths[dev].is_midi) {
608 struct midi_info minf; 611 struct midi_info minf;
609 snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf); 612 snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
index ee0741f9eb53..fbef38a9604a 100644
--- a/sound/mips/au1x00.c
+++ b/sound/mips/au1x00.c
@@ -38,7 +38,6 @@
38#include <linux/interrupt.h> 38#include <linux/interrupt.h>
39#include <linux/init.h> 39#include <linux/init.h>
40#include <linux/slab.h> 40#include <linux/slab.h>
41#include <linux/version.h>
42#include <sound/core.h> 41#include <sound/core.h>
43#include <sound/initval.h> 42#include <sound/initval.h>
44#include <sound/pcm.h> 43#include <sound/pcm.h>
diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c
index bb4a0969f461..725fef0f59a3 100644
--- a/sound/oss/vidc.c
+++ b/sound/oss/vidc.c
@@ -22,7 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/dma.h> 26#include <asm/dma.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/hardware/iomd.h> 28#include <asm/hardware/iomd.h>
diff --git a/sound/oss/vidc_fill.S b/sound/oss/vidc_fill.S
index 01ccc074cc11..bed34921d176 100644
--- a/sound/oss/vidc_fill.S
+++ b/sound/oss/vidc_fill.S
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/hardware/iomd.h> 15#include <asm/hardware/iomd.h>
16 16
17 .text 17 .text
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c
index 88490418f932..c47842fad657 100644
--- a/sound/oss/waveartist.c
+++ b/sound/oss/waveartist.c
@@ -47,7 +47,7 @@
47#include "waveartist.h" 47#include "waveartist.h"
48 48
49#ifdef CONFIG_ARM 49#ifdef CONFIG_ARM
50#include <asm/hardware.h> 50#include <mach/hardware.h>
51#include <asm/mach-types.h> 51#include <asm/mach-types.h>
52#endif 52#endif
53 53
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index f7d95b224a98..31f52d3fc21f 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -845,7 +845,7 @@ config SND_VIRTUOSO
845 select SND_OXYGEN_LIB 845 select SND_OXYGEN_LIB
846 help 846 help
847 Say Y here to include support for sound cards based on the 847 Say Y here to include support for sound cards based on the
848 Asus AV100/AV200 chips, i.e., Xonar D2, DX and D2X. 848 Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2 and D2X.
849 849
850 To compile this driver as a module, choose M here: the module 850 To compile this driver as a module, choose M here: the module
851 will be called snd-virtuoso. 851 will be called snd-virtuoso.
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 2f8b28add276..6abe8a3bd365 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -249,11 +249,12 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
249 .name = "MSI K8N Diamond MB [SB0438]", 249 .name = "MSI K8N Diamond MB [SB0438]",
250 .gpio_type = 2, 250 .gpio_type = 2,
251 .i2c_adc = 1 } , 251 .i2c_adc = 1 } ,
252 /* Another MSI K8N Diamond MB, which has apprently a different SSID */ 252 /* MSI K8N Diamond PLUS MB */
253 { .serial = 0x10091102, 253 { .serial = 0x10091102,
254 .name = "MSI K8N Diamond MB", 254 .name = "MSI K8N Diamond MB",
255 .gpio_type = 2, 255 .gpio_type = 2,
256 .i2c_adc = 1 } , 256 .i2c_adc = 1,
257 .spi_dac = 2 },
257 /* Shuttle XPC SD31P which has an onboard Creative Labs 258 /* Shuttle XPC SD31P which has an onboard Creative Labs
258 * Sound Blaster Live! 24-bit EAX 259 * Sound Blaster Live! 24-bit EAX
259 * high-definition 7.1 audio processor". 260 * high-definition 7.1 audio processor".
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index ef9f072b47fc..1c53e337ecb2 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -101,6 +101,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},"
101 "{Intel, ICH8}," 101 "{Intel, ICH8},"
102 "{Intel, ICH9}," 102 "{Intel, ICH9},"
103 "{Intel, ICH10}," 103 "{Intel, ICH10},"
104 "{Intel, PCH},"
104 "{Intel, SCH}," 105 "{Intel, SCH},"
105 "{ATI, SB450}," 106 "{ATI, SB450},"
106 "{ATI, SB600}," 107 "{ATI, SB600},"
@@ -277,6 +278,9 @@ enum {
277/* Defines for Nvidia HDA support */ 278/* Defines for Nvidia HDA support */
278#define NVIDIA_HDA_TRANSREG_ADDR 0x4e 279#define NVIDIA_HDA_TRANSREG_ADDR 0x4e
279#define NVIDIA_HDA_ENABLE_COHBITS 0x0f 280#define NVIDIA_HDA_ENABLE_COHBITS 0x0f
281#define NVIDIA_HDA_ISTRM_COH 0x4d
282#define NVIDIA_HDA_OSTRM_COH 0x4c
283#define NVIDIA_HDA_ENABLE_COHBIT 0x01
280 284
281/* Defines for Intel SCH HDA snoop control */ 285/* Defines for Intel SCH HDA snoop control */
282#define INTEL_SCH_HDA_DEVC 0x78 286#define INTEL_SCH_HDA_DEVC 0x78
@@ -899,6 +903,12 @@ static void azx_init_pci(struct azx *chip)
899 update_pci_byte(chip->pci, 903 update_pci_byte(chip->pci,
900 NVIDIA_HDA_TRANSREG_ADDR, 904 NVIDIA_HDA_TRANSREG_ADDR,
901 0x0f, NVIDIA_HDA_ENABLE_COHBITS); 905 0x0f, NVIDIA_HDA_ENABLE_COHBITS);
906 update_pci_byte(chip->pci,
907 NVIDIA_HDA_ISTRM_COH,
908 0x01, NVIDIA_HDA_ENABLE_COHBIT);
909 update_pci_byte(chip->pci,
910 NVIDIA_HDA_OSTRM_COH,
911 0x01, NVIDIA_HDA_ENABLE_COHBIT);
902 break; 912 break;
903 case AZX_DRIVER_SCH: 913 case AZX_DRIVER_SCH:
904 pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop); 914 pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop);
@@ -2263,6 +2273,8 @@ static struct pci_device_id azx_ids[] = {
2263 { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH }, 2273 { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH },
2264 { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH }, 2274 { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH },
2265 { PCI_DEVICE(0x8086, 0x3a6e), .driver_data = AZX_DRIVER_ICH }, 2275 { PCI_DEVICE(0x8086, 0x3a6e), .driver_data = AZX_DRIVER_ICH },
2276 /* PCH */
2277 { PCI_DEVICE(0x8086, 0x3b56), .driver_data = AZX_DRIVER_ICH },
2266 /* SCH */ 2278 /* SCH */
2267 { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH }, 2279 { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH },
2268 /* ATI SB 450/600 */ 2280 /* ATI SB 450/600 */
@@ -2272,6 +2284,7 @@ static struct pci_device_id azx_ids[] = {
2272 { PCI_DEVICE(0x1002, 0x793b), .driver_data = AZX_DRIVER_ATIHDMI }, 2284 { PCI_DEVICE(0x1002, 0x793b), .driver_data = AZX_DRIVER_ATIHDMI },
2273 { PCI_DEVICE(0x1002, 0x7919), .driver_data = AZX_DRIVER_ATIHDMI }, 2285 { PCI_DEVICE(0x1002, 0x7919), .driver_data = AZX_DRIVER_ATIHDMI },
2274 { PCI_DEVICE(0x1002, 0x960f), .driver_data = AZX_DRIVER_ATIHDMI }, 2286 { PCI_DEVICE(0x1002, 0x960f), .driver_data = AZX_DRIVER_ATIHDMI },
2287 { PCI_DEVICE(0x1002, 0x970f), .driver_data = AZX_DRIVER_ATIHDMI },
2275 { PCI_DEVICE(0x1002, 0xaa00), .driver_data = AZX_DRIVER_ATIHDMI }, 2288 { PCI_DEVICE(0x1002, 0xaa00), .driver_data = AZX_DRIVER_ATIHDMI },
2276 { PCI_DEVICE(0x1002, 0xaa08), .driver_data = AZX_DRIVER_ATIHDMI }, 2289 { PCI_DEVICE(0x1002, 0xaa08), .driver_data = AZX_DRIVER_ATIHDMI },
2277 { PCI_DEVICE(0x1002, 0xaa10), .driver_data = AZX_DRIVER_ATIHDMI }, 2290 { PCI_DEVICE(0x1002, 0xaa10), .driver_data = AZX_DRIVER_ATIHDMI },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index add4e87e0b20..66025161bd69 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -952,7 +952,7 @@ do_sku:
952 tmp | 0x2010); 952 tmp | 0x2010);
953 break; 953 break;
954 case 0x10ec0888: 954 case 0x10ec0888:
955 alc888_coef_init(codec); 955 /*alc888_coef_init(codec);*/ /* called in alc_init() */
956 break; 956 break;
957 case 0x10ec0267: 957 case 0x10ec0267:
958 case 0x10ec0268: 958 case 0x10ec0268:
@@ -2439,6 +2439,8 @@ static int alc_init(struct hda_codec *codec)
2439 unsigned int i; 2439 unsigned int i;
2440 2440
2441 alc_fix_pll(codec); 2441 alc_fix_pll(codec);
2442 if (codec->vendor_id == 0x10ec0888)
2443 alc888_coef_init(codec);
2442 2444
2443 for (i = 0; i < spec->num_init_verbs; i++) 2445 for (i = 0; i < spec->num_init_verbs; i++)
2444 snd_hda_sequence_write(codec, spec->init_verbs[i]); 2446 snd_hda_sequence_write(codec, spec->init_verbs[i]);
@@ -6195,7 +6197,6 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
6195 SND_PCI_QUIRK(0x1043, 0x817f, "Asus P5LD2", ALC882_6ST_DIG), 6197 SND_PCI_QUIRK(0x1043, 0x817f, "Asus P5LD2", ALC882_6ST_DIG),
6196 SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), 6198 SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG),
6197 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), 6199 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG),
6198 SND_PCI_QUIRK(0x106b, 0x00a0, "Apple iMac 24''", ALC885_IMAC24),
6199 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG), 6200 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG),
6200 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ 6201 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */
6201 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), 6202 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
@@ -6437,6 +6438,39 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec)
6437 } 6438 }
6438} 6439}
6439 6440
6441static void alc882_auto_init_input_src(struct hda_codec *codec)
6442{
6443 struct alc_spec *spec = codec->spec;
6444 const struct hda_input_mux *imux = spec->input_mux;
6445 int c;
6446
6447 for (c = 0; c < spec->num_adc_nids; c++) {
6448 hda_nid_t conn_list[HDA_MAX_NUM_INPUTS];
6449 hda_nid_t nid = spec->capsrc_nids[c];
6450 int conns, mute, idx, item;
6451
6452 conns = snd_hda_get_connections(codec, nid, conn_list,
6453 ARRAY_SIZE(conn_list));
6454 if (conns < 0)
6455 continue;
6456 for (idx = 0; idx < conns; idx++) {
6457 /* if the current connection is the selected one,
6458 * unmute it as default - otherwise mute it
6459 */
6460 mute = AMP_IN_MUTE(idx);
6461 for (item = 0; item < imux->num_items; item++) {
6462 if (imux->items[item].index == idx) {
6463 if (spec->cur_mux[c] == item)
6464 mute = AMP_IN_UNMUTE(idx);
6465 break;
6466 }
6467 }
6468 snd_hda_codec_write(codec, nid, 0,
6469 AC_VERB_SET_AMP_GAIN_MUTE, mute);
6470 }
6471 }
6472}
6473
6440/* add mic boosts if needed */ 6474/* add mic boosts if needed */
6441static int alc_auto_add_mic_boost(struct hda_codec *codec) 6475static int alc_auto_add_mic_boost(struct hda_codec *codec)
6442{ 6476{
@@ -6491,6 +6525,7 @@ static void alc882_auto_init(struct hda_codec *codec)
6491 alc882_auto_init_multi_out(codec); 6525 alc882_auto_init_multi_out(codec);
6492 alc882_auto_init_hp_out(codec); 6526 alc882_auto_init_hp_out(codec);
6493 alc882_auto_init_analog_input(codec); 6527 alc882_auto_init_analog_input(codec);
6528 alc882_auto_init_input_src(codec);
6494 if (spec->unsol_event) 6529 if (spec->unsol_event)
6495 alc_sku_automute(codec); 6530 alc_sku_automute(codec);
6496} 6531}
@@ -8285,6 +8320,8 @@ static void alc883_auto_init_analog_input(struct hda_codec *codec)
8285 } 8320 }
8286} 8321}
8287 8322
8323#define alc883_auto_init_input_src alc882_auto_init_input_src
8324
8288/* almost identical with ALC880 parser... */ 8325/* almost identical with ALC880 parser... */
8289static int alc883_parse_auto_config(struct hda_codec *codec) 8326static int alc883_parse_auto_config(struct hda_codec *codec)
8290{ 8327{
@@ -8315,6 +8352,7 @@ static void alc883_auto_init(struct hda_codec *codec)
8315 alc883_auto_init_multi_out(codec); 8352 alc883_auto_init_multi_out(codec);
8316 alc883_auto_init_hp_out(codec); 8353 alc883_auto_init_hp_out(codec);
8317 alc883_auto_init_analog_input(codec); 8354 alc883_auto_init_analog_input(codec);
8355 alc883_auto_init_input_src(codec);
8318 if (spec->unsol_event) 8356 if (spec->unsol_event)
8319 alc_sku_automute(codec); 8357 alc_sku_automute(codec);
8320} 8358}
@@ -8389,8 +8427,6 @@ static int patch_alc883(struct hda_codec *codec)
8389 codec->patch_ops = alc_patch_ops; 8427 codec->patch_ops = alc_patch_ops;
8390 if (board_config == ALC883_AUTO) 8428 if (board_config == ALC883_AUTO)
8391 spec->init_hook = alc883_auto_init; 8429 spec->init_hook = alc883_auto_init;
8392 else if (codec->vendor_id == 0x10ec0888)
8393 spec->init_hook = alc888_coef_init;
8394 8430
8395#ifdef CONFIG_SND_HDA_POWER_SAVE 8431#ifdef CONFIG_SND_HDA_POWER_SAVE
8396 if (!spec->loopback.amplist) 8432 if (!spec->loopback.amplist)
@@ -9663,6 +9699,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
9663#define alc262_auto_init_multi_out alc882_auto_init_multi_out 9699#define alc262_auto_init_multi_out alc882_auto_init_multi_out
9664#define alc262_auto_init_hp_out alc882_auto_init_hp_out 9700#define alc262_auto_init_hp_out alc882_auto_init_hp_out
9665#define alc262_auto_init_analog_input alc882_auto_init_analog_input 9701#define alc262_auto_init_analog_input alc882_auto_init_analog_input
9702#define alc262_auto_init_input_src alc882_auto_init_input_src
9666 9703
9667 9704
9668/* init callback for auto-configuration model -- overriding the default init */ 9705/* init callback for auto-configuration model -- overriding the default init */
@@ -9672,6 +9709,7 @@ static void alc262_auto_init(struct hda_codec *codec)
9672 alc262_auto_init_multi_out(codec); 9709 alc262_auto_init_multi_out(codec);
9673 alc262_auto_init_hp_out(codec); 9710 alc262_auto_init_hp_out(codec);
9674 alc262_auto_init_analog_input(codec); 9711 alc262_auto_init_analog_input(codec);
9712 alc262_auto_init_input_src(codec);
9675 if (spec->unsol_event) 9713 if (spec->unsol_event)
9676 alc_sku_automute(codec); 9714 alc_sku_automute(codec);
9677} 9715}
@@ -13330,6 +13368,8 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec)
13330 } 13368 }
13331} 13369}
13332 13370
13371#define alc861vd_auto_init_input_src alc882_auto_init_input_src
13372
13333#define alc861vd_idx_to_mixer_vol(nid) ((nid) + 0x02) 13373#define alc861vd_idx_to_mixer_vol(nid) ((nid) + 0x02)
13334#define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) 13374#define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c)
13335 13375
@@ -13512,6 +13552,7 @@ static void alc861vd_auto_init(struct hda_codec *codec)
13512 alc861vd_auto_init_multi_out(codec); 13552 alc861vd_auto_init_multi_out(codec);
13513 alc861vd_auto_init_hp_out(codec); 13553 alc861vd_auto_init_hp_out(codec);
13514 alc861vd_auto_init_analog_input(codec); 13554 alc861vd_auto_init_analog_input(codec);
13555 alc861vd_auto_init_input_src(codec);
13515 if (spec->unsol_event) 13556 if (spec->unsol_event)
13516 alc_sku_automute(codec); 13557 alc_sku_automute(codec);
13517} 13558}
@@ -14025,6 +14066,13 @@ static struct hda_verb alc662_auto_init_verbs[] = {
14025 { } 14066 { }
14026}; 14067};
14027 14068
14069/* additional verbs for ALC663 */
14070static struct hda_verb alc663_auto_init_verbs[] = {
14071 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
14072 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
14073 { }
14074};
14075
14028static struct hda_verb alc663_m51va_init_verbs[] = { 14076static struct hda_verb alc663_m51va_init_verbs[] = {
14029 {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 14077 {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
14030 {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 14078 {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
@@ -14553,6 +14601,14 @@ static int alc662_auto_create_extra_out(struct alc_spec *spec, hda_nid_t pin,
14553 if (!pin) 14601 if (!pin)
14554 return 0; 14602 return 0;
14555 14603
14604 if (pin == 0x17) {
14605 /* ALC663 has a mono output pin on 0x17 */
14606 sprintf(name, "%s Playback Switch", pfx);
14607 err = add_control(spec, ALC_CTL_WIDGET_MUTE, name,
14608 HDA_COMPOSE_AMP_VAL(pin, 2, 0, HDA_OUTPUT));
14609 return err;
14610 }
14611
14556 if (alc880_is_fixed_pin(pin)) { 14612 if (alc880_is_fixed_pin(pin)) {
14557 nid = alc880_idx_to_dac(alc880_fixed_pin_idx(pin)); 14613 nid = alc880_idx_to_dac(alc880_fixed_pin_idx(pin));
14558 /* printk("DAC nid=%x\n",nid); */ 14614 /* printk("DAC nid=%x\n",nid); */
@@ -14677,6 +14733,8 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec)
14677 } 14733 }
14678} 14734}
14679 14735
14736#define alc662_auto_init_input_src alc882_auto_init_input_src
14737
14680static int alc662_parse_auto_config(struct hda_codec *codec) 14738static int alc662_parse_auto_config(struct hda_codec *codec)
14681{ 14739{
14682 struct alc_spec *spec = codec->spec; 14740 struct alc_spec *spec = codec->spec;
@@ -14721,6 +14779,14 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
14721 spec->input_mux = &spec->private_imux; 14779 spec->input_mux = &spec->private_imux;
14722 14780
14723 spec->init_verbs[spec->num_init_verbs++] = alc662_auto_init_verbs; 14781 spec->init_verbs[spec->num_init_verbs++] = alc662_auto_init_verbs;
14782 if (codec->vendor_id == 0x10ec0663)
14783 spec->init_verbs[spec->num_init_verbs++] =
14784 alc663_auto_init_verbs;
14785
14786 err = alc_auto_add_mic_boost(codec);
14787 if (err < 0)
14788 return err;
14789
14724 spec->mixers[spec->num_mixers] = alc662_capture_mixer; 14790 spec->mixers[spec->num_mixers] = alc662_capture_mixer;
14725 spec->num_mixers++; 14791 spec->num_mixers++;
14726 return 1; 14792 return 1;
@@ -14733,6 +14799,7 @@ static void alc662_auto_init(struct hda_codec *codec)
14733 alc662_auto_init_multi_out(codec); 14799 alc662_auto_init_multi_out(codec);
14734 alc662_auto_init_hp_out(codec); 14800 alc662_auto_init_hp_out(codec);
14735 alc662_auto_init_analog_input(codec); 14801 alc662_auto_init_analog_input(codec);
14802 alc662_auto_init_input_src(codec);
14736 if (spec->unsol_event) 14803 if (spec->unsol_event)
14737 alc_sku_automute(codec); 14804 alc_sku_automute(codec);
14738} 14805}
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 7fdafcb0015d..ad994fcab725 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -560,8 +560,9 @@ static struct hda_verb dell_eq_core_init[] = {
560}; 560};
561 561
562static struct hda_verb dell_m6_core_init[] = { 562static struct hda_verb dell_m6_core_init[] = {
563 /* set master volume and direct control */ 563 /* set master volume to max value without distortion
564 { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 564 * and direct control */
565 { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
565 /* setup audio connections */ 566 /* setup audio connections */
566 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00}, 567 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
567 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, 568 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c
index 7442460583dd..dad393ae040a 100644
--- a/sound/pci/oxygen/hifier.c
+++ b/sound/pci/oxygen/hifier.c
@@ -17,6 +17,7 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#include <linux/delay.h>
20#include <linux/pci.h> 21#include <linux/pci.h>
21#include <sound/control.h> 22#include <sound/control.h>
22#include <sound/core.h> 23#include <sound/core.h>
@@ -107,6 +108,9 @@ static void set_ak4396_params(struct oxygen *chip,
107 else 108 else
108 value |= AK4396_DFS_QUAD; 109 value |= AK4396_DFS_QUAD;
109 data->ak4396_ctl2 = value; 110 data->ak4396_ctl2 = value;
111
112 msleep(1); /* wait for the new MCLK to become stable */
113
110 ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB); 114 ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB);
111 ak4396_write(chip, AK4396_CONTROL_2, value); 115 ak4396_write(chip, AK4396_CONTROL_2, value);
112 ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB | AK4396_RSTN); 116 ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB | AK4396_RSTN);
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 7c8ae31eb468..c5829d30ef86 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -28,6 +28,7 @@
28 * GPIO 1 -> DFS1 of AK5385 28 * GPIO 1 -> DFS1 of AK5385
29 */ 29 */
30 30
31#include <linux/delay.h>
31#include <linux/mutex.h> 32#include <linux/mutex.h>
32#include <linux/pci.h> 33#include <linux/pci.h>
33#include <sound/ac97_codec.h> 34#include <sound/ac97_codec.h>
@@ -213,6 +214,9 @@ static void set_ak4396_params(struct oxygen *chip,
213 else 214 else
214 value |= AK4396_DFS_QUAD; 215 value |= AK4396_DFS_QUAD;
215 data->ak4396_ctl2 = value; 216 data->ak4396_ctl2 = value;
217
218 msleep(1); /* wait for the new MCLK to become stable */
219
216 for (i = 0; i < 4; ++i) { 220 for (i = 0; i < 4; ++i) {
217 ak4396_write(chip, i, 221 ak4396_write(chip, i,
218 AK4396_CONTROL_1, AK4396_DIF_24_MSB); 222 AK4396_CONTROL_1, AK4396_DIF_24_MSB);
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index 6facac5aed90..05eb8994c141 100644
--- a/sound/pci/oxygen/oxygen_mixer.c
+++ b/sound/pci/oxygen/oxygen_mixer.c
@@ -512,9 +512,12 @@ static int ac97_switch_get(struct snd_kcontrol *ctl,
512 512
513static void mute_ac97_ctl(struct oxygen *chip, unsigned int control) 513static void mute_ac97_ctl(struct oxygen *chip, unsigned int control)
514{ 514{
515 unsigned int priv_idx = chip->controls[control]->private_value & 0xff; 515 unsigned int priv_idx;
516 u16 value; 516 u16 value;
517 517
518 if (!chip->controls[control])
519 return;
520 priv_idx = chip->controls[control]->private_value & 0xff;
518 value = oxygen_read_ac97(chip, 0, priv_idx); 521 value = oxygen_read_ac97(chip, 0, priv_idx);
519 if (!(value & 0x8000)) { 522 if (!(value & 0x8000)) {
520 oxygen_write_ac97(chip, 0, priv_idx, value | 0x8000); 523 oxygen_write_ac97(chip, 0, priv_idx, value | 0x8000);
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index 9a2c16bf94e0..01d7b75f9182 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -36,15 +36,15 @@
36 */ 36 */
37 37
38/* 38/*
39 * Xonar DX 39 * Xonar D1/DX
40 * -------- 40 * -----------
41 * 41 *
42 * CMI8788: 42 * CMI8788:
43 * 43 *
44 * I²C <-> CS4398 (front) 44 * I²C <-> CS4398 (front)
45 * <-> CS4362A (surround, center/LFE, back) 45 * <-> CS4362A (surround, center/LFE, back)
46 * 46 *
47 * GPI 0 <- external power present 47 * GPI 0 <- external power present (DX only)
48 * 48 *
49 * GPIO 0 -> enable output to speakers 49 * GPIO 0 -> enable output to speakers
50 * GPIO 1 -> enable front panel I/O 50 * GPIO 1 -> enable front panel I/O
@@ -96,6 +96,7 @@ MODULE_PARM_DESC(enable, "enable card");
96enum { 96enum {
97 MODEL_D2, 97 MODEL_D2,
98 MODEL_D2X, 98 MODEL_D2X,
99 MODEL_D1,
99 MODEL_DX, 100 MODEL_DX,
100}; 101};
101 102
@@ -103,6 +104,7 @@ static struct pci_device_id xonar_ids[] __devinitdata = {
103 { OXYGEN_PCI_SUBID(0x1043, 0x8269), .driver_data = MODEL_D2 }, 104 { OXYGEN_PCI_SUBID(0x1043, 0x8269), .driver_data = MODEL_D2 },
104 { OXYGEN_PCI_SUBID(0x1043, 0x8275), .driver_data = MODEL_DX }, 105 { OXYGEN_PCI_SUBID(0x1043, 0x8275), .driver_data = MODEL_DX },
105 { OXYGEN_PCI_SUBID(0x1043, 0x82b7), .driver_data = MODEL_D2X }, 106 { OXYGEN_PCI_SUBID(0x1043, 0x82b7), .driver_data = MODEL_D2X },
107 { OXYGEN_PCI_SUBID(0x1043, 0x834f), .driver_data = MODEL_D1 },
106 { } 108 { }
107}; 109};
108MODULE_DEVICE_TABLE(pci, xonar_ids); 110MODULE_DEVICE_TABLE(pci, xonar_ids);
@@ -313,15 +315,12 @@ static void cs43xx_init(struct oxygen *chip)
313 cs4362a_write(chip, 0x01, CS4362A_CPEN); 315 cs4362a_write(chip, 0x01, CS4362A_CPEN);
314} 316}
315 317
316static void xonar_dx_init(struct oxygen *chip) 318static void xonar_d1_init(struct oxygen *chip)
317{ 319{
318 struct xonar_data *data = chip->model_data; 320 struct xonar_data *data = chip->model_data;
319 321
320 data->anti_pop_delay = 800; 322 data->anti_pop_delay = 800;
321 data->output_enable_bit = GPIO_DX_OUTPUT_ENABLE; 323 data->output_enable_bit = GPIO_DX_OUTPUT_ENABLE;
322 data->ext_power_reg = OXYGEN_GPI_DATA;
323 data->ext_power_int_reg = OXYGEN_GPI_INTERRUPT_MASK;
324 data->ext_power_bit = GPI_DX_EXT_POWER;
325 data->cs4398_fm = CS4398_FM_SINGLE | CS4398_DEM_NONE | CS4398_DIF_LJUST; 324 data->cs4398_fm = CS4398_FM_SINGLE | CS4398_DEM_NONE | CS4398_DIF_LJUST;
326 data->cs4362a_fm = CS4362A_FM_SINGLE | 325 data->cs4362a_fm = CS4362A_FM_SINGLE |
327 CS4362A_ATAPI_B_R | CS4362A_ATAPI_A_L; 326 CS4362A_ATAPI_B_R | CS4362A_ATAPI_A_L;
@@ -345,6 +344,16 @@ static void xonar_dx_init(struct oxygen *chip)
345 snd_component_add(chip->card, "CS5361"); 344 snd_component_add(chip->card, "CS5361");
346} 345}
347 346
347static void xonar_dx_init(struct oxygen *chip)
348{
349 struct xonar_data *data = chip->model_data;
350
351 data->ext_power_reg = OXYGEN_GPI_DATA;
352 data->ext_power_int_reg = OXYGEN_GPI_INTERRUPT_MASK;
353 data->ext_power_bit = GPI_DX_EXT_POWER;
354 xonar_d1_init(chip);
355}
356
348static void xonar_cleanup(struct oxygen *chip) 357static void xonar_cleanup(struct oxygen *chip)
349{ 358{
350 struct xonar_data *data = chip->model_data; 359 struct xonar_data *data = chip->model_data;
@@ -352,7 +361,7 @@ static void xonar_cleanup(struct oxygen *chip)
352 oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, data->output_enable_bit); 361 oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, data->output_enable_bit);
353} 362}
354 363
355static void xonar_dx_cleanup(struct oxygen *chip) 364static void xonar_d1_cleanup(struct oxygen *chip)
356{ 365{
357 xonar_cleanup(chip); 366 xonar_cleanup(chip);
358 cs4362a_write(chip, 0x01, CS4362A_PDN | CS4362A_CPEN); 367 cs4362a_write(chip, 0x01, CS4362A_PDN | CS4362A_CPEN);
@@ -365,7 +374,7 @@ static void xonar_d2_resume(struct oxygen *chip)
365 xonar_enable_output(chip); 374 xonar_enable_output(chip);
366} 375}
367 376
368static void xonar_dx_resume(struct oxygen *chip) 377static void xonar_d1_resume(struct oxygen *chip)
369{ 378{
370 cs43xx_init(chip); 379 cs43xx_init(chip);
371 xonar_enable_output(chip); 380 xonar_enable_output(chip);
@@ -513,7 +522,7 @@ static const struct snd_kcontrol_new front_panel_switch = {
513 .put = front_panel_put, 522 .put = front_panel_put,
514}; 523};
515 524
516static void xonar_dx_ac97_switch(struct oxygen *chip, 525static void xonar_d1_ac97_switch(struct oxygen *chip,
517 unsigned int reg, unsigned int mute) 526 unsigned int reg, unsigned int mute)
518{ 527{
519 if (reg == AC97_LINE) { 528 if (reg == AC97_LINE) {
@@ -536,7 +545,7 @@ static int xonar_d2_control_filter(struct snd_kcontrol_new *template)
536 return 0; 545 return 0;
537} 546}
538 547
539static int xonar_dx_control_filter(struct snd_kcontrol_new *template) 548static int xonar_d1_control_filter(struct snd_kcontrol_new *template)
540{ 549{
541 if (!strncmp(template->name, "CD Capture ", 11)) 550 if (!strncmp(template->name, "CD Capture ", 11))
542 return 1; /* no CD input */ 551 return 1; /* no CD input */
@@ -548,7 +557,7 @@ static int xonar_mixer_init(struct oxygen *chip)
548 return snd_ctl_add(chip->card, snd_ctl_new1(&alt_switch, chip)); 557 return snd_ctl_add(chip->card, snd_ctl_new1(&alt_switch, chip));
549} 558}
550 559
551static int xonar_dx_mixer_init(struct oxygen *chip) 560static int xonar_d1_mixer_init(struct oxygen *chip)
552{ 561{
553 return snd_ctl_add(chip->card, snd_ctl_new1(&front_panel_switch, chip)); 562 return snd_ctl_add(chip->card, snd_ctl_new1(&front_panel_switch, chip));
554} 563}
@@ -615,23 +624,51 @@ static const struct oxygen_model xonar_models[] = {
615 .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, 624 .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
616 .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, 625 .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
617 }, 626 },
627 [MODEL_D1] = {
628 .shortname = "Xonar D1",
629 .longname = "Asus Virtuoso 100",
630 .chip = "AV200",
631 .owner = THIS_MODULE,
632 .init = xonar_d1_init,
633 .control_filter = xonar_d1_control_filter,
634 .mixer_init = xonar_d1_mixer_init,
635 .cleanup = xonar_d1_cleanup,
636 .suspend = xonar_d1_cleanup,
637 .resume = xonar_d1_resume,
638 .set_dac_params = set_cs43xx_params,
639 .set_adc_params = set_cs53x1_params,
640 .update_dac_volume = update_cs43xx_volume,
641 .update_dac_mute = update_cs43xx_mute,
642 .ac97_switch = xonar_d1_ac97_switch,
643 .dac_tlv = cs4362a_db_scale,
644 .model_data_size = sizeof(struct xonar_data),
645 .pcm_dev_cfg = PLAYBACK_0_TO_I2S |
646 PLAYBACK_1_TO_SPDIF |
647 CAPTURE_0_FROM_I2S_2,
648 .dac_channels = 8,
649 .dac_volume_min = 0,
650 .dac_volume_max = 127,
651 .function_flags = OXYGEN_FUNCTION_2WIRE,
652 .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
653 .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
654 },
618 [MODEL_DX] = { 655 [MODEL_DX] = {
619 .shortname = "Xonar DX", 656 .shortname = "Xonar DX",
620 .longname = "Asus Virtuoso 100", 657 .longname = "Asus Virtuoso 100",
621 .chip = "AV200", 658 .chip = "AV200",
622 .owner = THIS_MODULE, 659 .owner = THIS_MODULE,
623 .init = xonar_dx_init, 660 .init = xonar_dx_init,
624 .control_filter = xonar_dx_control_filter, 661 .control_filter = xonar_d1_control_filter,
625 .mixer_init = xonar_dx_mixer_init, 662 .mixer_init = xonar_d1_mixer_init,
626 .cleanup = xonar_dx_cleanup, 663 .cleanup = xonar_d1_cleanup,
627 .suspend = xonar_dx_cleanup, 664 .suspend = xonar_d1_cleanup,
628 .resume = xonar_dx_resume, 665 .resume = xonar_d1_resume,
629 .set_dac_params = set_cs43xx_params, 666 .set_dac_params = set_cs43xx_params,
630 .set_adc_params = set_cs53x1_params, 667 .set_adc_params = set_cs53x1_params,
631 .update_dac_volume = update_cs43xx_volume, 668 .update_dac_volume = update_cs43xx_volume,
632 .update_dac_mute = update_cs43xx_mute, 669 .update_dac_mute = update_cs43xx_mute,
633 .gpio_changed = xonar_gpio_changed, 670 .gpio_changed = xonar_gpio_changed,
634 .ac97_switch = xonar_dx_ac97_switch, 671 .ac97_switch = xonar_d1_ac97_switch,
635 .dac_tlv = cs4362a_db_scale, 672 .dac_tlv = cs4362a_db_scale,
636 .model_data_size = sizeof(struct xonar_data), 673 .model_data_size = sizeof(struct xonar_data),
637 .pcm_dev_cfg = PLAYBACK_0_TO_I2S | 674 .pcm_dev_cfg = PLAYBACK_0_TO_I2S |
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 9ca113326143..54df8baf916f 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -42,7 +42,7 @@
42#include <sound/info.h> 42#include <sound/info.h>
43#include <asm/io.h> 43#include <asm/io.h>
44#include <asm/dma.h> 44#include <asm/dma.h>
45#include <asm/dreamcast/sysasic.h> 45#include <mach/sysasic.h>
46#include "aica.h" 46#include "aica.h"
47 47
48MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>"); 48MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");
diff --git a/sound/soc/at32/playpaq_wm8510.c b/sound/soc/at32/playpaq_wm8510.c
index fee5f8e58957..3f326219f1ec 100644
--- a/sound/soc/at32/playpaq_wm8510.c
+++ b/sound/soc/at32/playpaq_wm8510.c
@@ -36,8 +36,8 @@
36#include <sound/soc.h> 36#include <sound/soc.h>
37#include <sound/soc-dapm.h> 37#include <sound/soc-dapm.h>
38 38
39#include <asm/arch/at32ap700x.h> 39#include <mach/at32ap700x.h>
40#include <asm/arch/portmux.h> 40#include <mach/portmux.h>
41 41
42#include "../codecs/wm8510.h" 42#include "../codecs/wm8510.h"
43#include "at32-pcm.h" 43#include "at32-pcm.h"
diff --git a/sound/soc/at91/at91-pcm.c b/sound/soc/at91/at91-pcm.c
index d47492b2b6e5..7ab48bd25e4c 100644
--- a/sound/soc/at91/at91-pcm.c
+++ b/sound/soc/at91/at91-pcm.c
@@ -28,8 +28,8 @@
28#include <sound/pcm_params.h> 28#include <sound/pcm_params.h>
29#include <sound/soc.h> 29#include <sound/soc.h>
30 30
31#include <asm/arch/hardware.h> 31#include <mach/hardware.h>
32#include <asm/arch/at91_ssc.h> 32#include <mach/at91_ssc.h>
33 33
34#include "at91-pcm.h" 34#include "at91-pcm.h"
35 35
diff --git a/sound/soc/at91/at91-pcm.h b/sound/soc/at91/at91-pcm.h
index 58d0f00a07b2..e5aada2cb102 100644
--- a/sound/soc/at91/at91-pcm.h
+++ b/sound/soc/at91/at91-pcm.h
@@ -19,7 +19,7 @@
19#ifndef _AT91_PCM_H 19#ifndef _AT91_PCM_H
20#define _AT91_PCM_H 20#define _AT91_PCM_H
21 21
22#include <asm/arch/hardware.h> 22#include <mach/hardware.h>
23 23
24struct at91_ssc_periph { 24struct at91_ssc_periph {
25 void __iomem *base; 25 void __iomem *base;
diff --git a/sound/soc/at91/at91-ssc.c b/sound/soc/at91/at91-ssc.c
index 090e607f8692..5d44515e62e0 100644
--- a/sound/soc/at91/at91-ssc.c
+++ b/sound/soc/at91/at91-ssc.c
@@ -28,9 +28,9 @@
28#include <sound/initval.h> 28#include <sound/initval.h>
29#include <sound/soc.h> 29#include <sound/soc.h>
30 30
31#include <asm/arch/hardware.h> 31#include <mach/hardware.h>
32#include <asm/arch/at91_pmc.h> 32#include <mach/at91_pmc.h>
33#include <asm/arch/at91_ssc.h> 33#include <mach/at91_ssc.h>
34 34
35#include "at91-pcm.h" 35#include "at91-pcm.h"
36#include "at91-ssc.h" 36#include "at91-ssc.h"
diff --git a/sound/soc/at91/eti_b1_wm8731.c b/sound/soc/at91/eti_b1_wm8731.c
index d532de954241..b81d6b2cfa1d 100644
--- a/sound/soc/at91/eti_b1_wm8731.c
+++ b/sound/soc/at91/eti_b1_wm8731.c
@@ -22,7 +22,6 @@
22 22
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
25#include <linux/version.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/clk.h> 26#include <linux/clk.h>
28#include <linux/timer.h> 27#include <linux/timer.h>
@@ -33,8 +32,8 @@
33#include <sound/soc.h> 32#include <sound/soc.h>
34#include <sound/soc-dapm.h> 33#include <sound/soc-dapm.h>
35 34
36#include <asm/hardware.h> 35#include <mach/hardware.h>
37#include <asm/arch/gpio.h> 36#include <mach/gpio.h>
38 37
39#include "../codecs/wm8731.h" 38#include "../codecs/wm8731.h"
40#include "at91-pcm.h" 39#include "at91-pcm.h"
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index b26003c4f3e8..7da9f467b7b8 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -562,10 +562,9 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind)
562 client_template.addr = addr; 562 client_template.addr = addr;
563 563
564 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 564 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
565 if (i2c == NULL) { 565 if (i2c == NULL)
566 kfree(codec);
567 return -ENOMEM; 566 return -ENOMEM;
568 } 567
569 i2c_set_clientdata(i2c, codec); 568 i2c_set_clientdata(i2c, codec);
570 codec->control_data = i2c; 569 codec->control_data = i2c;
571 570
@@ -583,7 +582,6 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind)
583 return ret; 582 return ret;
584 583
585err: 584err:
586 kfree(codec);
587 kfree(i2c); 585 kfree(i2c);
588 return ret; 586 return ret;
589} 587}
@@ -660,6 +658,11 @@ static int ak4535_probe(struct platform_device *pdev)
660#else 658#else
661 /* Add other interfaces here */ 659 /* Add other interfaces here */
662#endif 660#endif
661
662 if (ret != 0) {
663 kfree(codec->private_data);
664 kfree(codec);
665 }
663 return ret; 666 return ret;
664} 667}
665 668
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index b1dce5f459db..5f9abb199435 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1199,10 +1199,9 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind)
1199 client_template.addr = addr; 1199 client_template.addr = addr;
1200 1200
1201 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 1201 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
1202 if (i2c == NULL) { 1202 if (i2c == NULL)
1203 kfree(codec);
1204 return -ENOMEM; 1203 return -ENOMEM;
1205 } 1204
1206 i2c_set_clientdata(i2c, codec); 1205 i2c_set_clientdata(i2c, codec);
1207 codec->control_data = i2c; 1206 codec->control_data = i2c;
1208 1207
@@ -1221,7 +1220,6 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind)
1221 return ret; 1220 return ret;
1222 1221
1223err: 1222err:
1224 kfree(codec);
1225 kfree(i2c); 1223 kfree(i2c);
1226 return ret; 1224 return ret;
1227} 1225}
@@ -1302,6 +1300,11 @@ static int aic3x_probe(struct platform_device *pdev)
1302#else 1300#else
1303 /* Add other interfaces here */ 1301 /* Add other interfaces here */
1304#endif 1302#endif
1303
1304 if (ret != 0) {
1305 kfree(codec->private_data);
1306 kfree(codec);
1307 }
1305 return ret; 1308 return ret;
1306} 1309}
1307 1310
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index a52d6d9e007a..807318fbdc8f 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -729,10 +729,9 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind)
729 client_template.addr = addr; 729 client_template.addr = addr;
730 730
731 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 731 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
732 if (i2c == NULL) { 732 if (i2c == NULL)
733 kfree(codec);
734 return -ENOMEM; 733 return -ENOMEM;
735 } 734
736 i2c_set_clientdata(i2c, codec); 735 i2c_set_clientdata(i2c, codec);
737 codec->control_data = i2c; 736 codec->control_data = i2c;
738 737
@@ -750,7 +749,6 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind)
750 return ret; 749 return ret;
751 750
752err: 751err:
753 kfree(codec);
754 kfree(i2c); 752 kfree(i2c);
755 return ret; 753 return ret;
756} 754}
@@ -817,6 +815,9 @@ static int uda1380_probe(struct platform_device *pdev)
817#else 815#else
818 /* Add other interfaces here */ 816 /* Add other interfaces here */
819#endif 817#endif
818
819 if (ret != 0)
820 kfree(codec);
820 return ret; 821 return ret;
821} 822}
822 823
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 67325fd95447..3d998e6a997e 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -693,10 +693,9 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind)
693 client_template.addr = addr; 693 client_template.addr = addr;
694 694
695 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 695 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
696 if (i2c == NULL) { 696 if (i2c == NULL)
697 kfree(codec);
698 return -ENOMEM; 697 return -ENOMEM;
699 } 698
700 i2c_set_clientdata(i2c, codec); 699 i2c_set_clientdata(i2c, codec);
701 codec->control_data = i2c; 700 codec->control_data = i2c;
702 701
@@ -714,7 +713,6 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind)
714 return ret; 713 return ret;
715 714
716err: 715err:
717 kfree(codec);
718 kfree(i2c); 716 kfree(i2c);
719 return ret; 717 return ret;
720} 718}
@@ -782,6 +780,9 @@ static int wm8510_probe(struct platform_device *pdev)
782#else 780#else
783 /* Add other interfaces here */ 781 /* Add other interfaces here */
784#endif 782#endif
783
784 if (ret != 0)
785 kfree(codec);
785 return ret; 786 return ret;
786} 787}
787 788
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 369d39c3f745..9402fcaf04fa 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -596,10 +596,9 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind)
596 client_template.addr = addr; 596 client_template.addr = addr;
597 597
598 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 598 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
599 if (i2c == NULL) { 599 if (i2c == NULL)
600 kfree(codec);
601 return -ENOMEM; 600 return -ENOMEM;
602 } 601
603 i2c_set_clientdata(i2c, codec); 602 i2c_set_clientdata(i2c, codec);
604 codec->control_data = i2c; 603 codec->control_data = i2c;
605 604
@@ -617,7 +616,6 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind)
617 return ret; 616 return ret;
618 617
619err: 618err:
620 kfree(codec);
621 kfree(i2c); 619 kfree(i2c);
622 return ret; 620 return ret;
623} 621}
@@ -693,6 +691,11 @@ static int wm8731_probe(struct platform_device *pdev)
693#else 691#else
694 /* Add other interfaces here */ 692 /* Add other interfaces here */
695#endif 693#endif
694
695 if (ret != 0) {
696 kfree(codec->private_data);
697 kfree(codec);
698 }
696 return ret; 699 return ret;
697} 700}
698 701
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index e23cb09f0d14..dd1f55404b29 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -348,8 +348,9 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = {
348 SND_SOC_DAPM_OUTPUT("ROUT1"), 348 SND_SOC_DAPM_OUTPUT("ROUT1"),
349 SND_SOC_DAPM_OUTPUT("LOUT2"), 349 SND_SOC_DAPM_OUTPUT("LOUT2"),
350 SND_SOC_DAPM_OUTPUT("ROUT2"), 350 SND_SOC_DAPM_OUTPUT("ROUT2"),
351 SND_SOC_DAPM_OUTPUT("MONO"), 351 SND_SOC_DAPM_OUTPUT("MONO1"),
352 SND_SOC_DAPM_OUTPUT("OUT3"), 352 SND_SOC_DAPM_OUTPUT("OUT3"),
353 SND_SOC_DAPM_OUTPUT("VREF"),
353 354
354 SND_SOC_DAPM_INPUT("LINPUT1"), 355 SND_SOC_DAPM_INPUT("LINPUT1"),
355 SND_SOC_DAPM_INPUT("LINPUT2"), 356 SND_SOC_DAPM_INPUT("LINPUT2"),
@@ -868,10 +869,9 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind)
868 client_template.addr = addr; 869 client_template.addr = addr;
869 870
870 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 871 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
871 if (i2c == NULL) { 872 if (i2c == NULL)
872 kfree(codec);
873 return -ENOMEM; 873 return -ENOMEM;
874 } 874
875 i2c_set_clientdata(i2c, codec); 875 i2c_set_clientdata(i2c, codec);
876 codec->control_data = i2c; 876 codec->control_data = i2c;
877 877
@@ -889,7 +889,6 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind)
889 return ret; 889 return ret;
890 890
891err: 891err:
892 kfree(codec);
893 kfree(i2c); 892 kfree(i2c);
894 return ret; 893 return ret;
895} 894}
@@ -965,6 +964,10 @@ static int wm8750_probe(struct platform_device *pdev)
965 /* Add other interfaces here */ 964 /* Add other interfaces here */
966#endif 965#endif
967 966
967 if (ret != 0) {
968 kfree(codec->private_data);
969 kfree(codec);
970 }
968 return ret; 971 return ret;
969} 972}
970 973
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 8604809f0c36..5761164fe16d 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -34,7 +34,6 @@
34 34
35#include <linux/module.h> 35#include <linux/module.h>
36#include <linux/moduleparam.h> 36#include <linux/moduleparam.h>
37#include <linux/version.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
39#include <linux/init.h> 38#include <linux/init.h>
40#include <linux/delay.h> 39#include <linux/delay.h>
@@ -1661,10 +1660,9 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind)
1661 client_template.addr = addr; 1660 client_template.addr = addr;
1662 1661
1663 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 1662 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
1664 if (!i2c) { 1663 if (!i2c)
1665 kfree(codec);
1666 return -ENOMEM; 1664 return -ENOMEM;
1667 } 1665
1668 i2c_set_clientdata(i2c, codec); 1666 i2c_set_clientdata(i2c, codec);
1669 codec->control_data = i2c; 1667 codec->control_data = i2c;
1670 1668
@@ -1683,7 +1681,6 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind)
1683 return ret; 1681 return ret;
1684 1682
1685err: 1683err:
1686 kfree(codec);
1687 kfree(i2c); 1684 kfree(i2c);
1688 return ret; 1685 return ret;
1689} 1686}
@@ -1760,6 +1757,11 @@ static int wm8753_probe(struct platform_device *pdev)
1760#else 1757#else
1761 /* Add other interfaces here */ 1758 /* Add other interfaces here */
1762#endif 1759#endif
1760
1761 if (ret != 0) {
1762 kfree(codec->private_data);
1763 kfree(codec);
1764 }
1763 return ret; 1765 return ret;
1764} 1766}
1765 1767
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 3ecce5168e94..dd995ef448b4 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -82,7 +82,7 @@ static const u16 wm8990_reg[] = {
82 0x0003, /* R35 - ClassD1 */ 82 0x0003, /* R35 - ClassD1 */
83 0x0000, /* R36 */ 83 0x0000, /* R36 */
84 0x0100, /* R37 - ClassD3 */ 84 0x0100, /* R37 - ClassD3 */
85 0x0000, /* R38 */ 85 0x0079, /* R38 - ClassD4 */
86 0x0000, /* R39 - Input Mixer1 */ 86 0x0000, /* R39 - Input Mixer1 */
87 0x0000, /* R40 - Input Mixer2 */ 87 0x0000, /* R40 - Input Mixer2 */
88 0x0000, /* R41 - Input Mixer3 */ 88 0x0000, /* R41 - Input Mixer3 */
@@ -311,11 +311,15 @@ SOC_SINGLE("Speaker Mode Switch", WM8990_CLASSD1,
311 WM8990_CDMODE_BIT, 1, 0), 311 WM8990_CDMODE_BIT, 1, 0),
312 312
313SOC_SINGLE("Speaker Output Attenuation Volume", WM8990_SPEAKER_VOLUME, 313SOC_SINGLE("Speaker Output Attenuation Volume", WM8990_SPEAKER_VOLUME,
314 WM8990_SPKVOL_SHIFT, WM8990_SPKVOL_MASK, 0), 314 WM8990_SPKATTN_SHIFT, WM8990_SPKATTN_MASK, 0),
315SOC_SINGLE("Speaker DC Boost Volume", WM8990_CLASSD3, 315SOC_SINGLE("Speaker DC Boost Volume", WM8990_CLASSD3,
316 WM8990_DCGAIN_SHIFT, WM8990_DCGAIN_MASK, 0), 316 WM8990_DCGAIN_SHIFT, WM8990_DCGAIN_MASK, 0),
317SOC_SINGLE("Speaker AC Boost Volume", WM8990_CLASSD3, 317SOC_SINGLE("Speaker AC Boost Volume", WM8990_CLASSD3,
318 WM8990_ACGAIN_SHIFT, WM8990_ACGAIN_MASK, 0), 318 WM8990_ACGAIN_SHIFT, WM8990_ACGAIN_MASK, 0),
319SOC_SINGLE_TLV("Speaker Volume", WM8990_CLASSD4,
320 WM8990_SPKVOL_SHIFT, WM8990_SPKVOL_MASK, 0, out_pga_tlv),
321SOC_SINGLE("Speaker ZC Switch", WM8990_CLASSD4,
322 WM8990_SPKZC_SHIFT, WM8990_SPKZC_MASK, 0),
319 323
320SOC_WM899X_OUTPGA_SINGLE_R_TLV("Left DAC Digital Volume", 324SOC_WM899X_OUTPGA_SINGLE_R_TLV("Left DAC Digital Volume",
321 WM8990_LEFT_DAC_DIGITAL_VOLUME, 325 WM8990_LEFT_DAC_DIGITAL_VOLUME,
@@ -920,7 +924,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
920 {"SPKMIX", "SPKMIX Left Mixer PGA Switch", "LOPGA"}, 924 {"SPKMIX", "SPKMIX Left Mixer PGA Switch", "LOPGA"},
921 {"SPKMIX", "SPKMIX Right Mixer PGA Switch", "ROPGA"}, 925 {"SPKMIX", "SPKMIX Right Mixer PGA Switch", "ROPGA"},
922 {"SPKMIX", "SPKMIX Right DAC Switch", "Right DAC"}, 926 {"SPKMIX", "SPKMIX Right DAC Switch", "Right DAC"},
923 {"SPKMIX", "SPKMIX Left DAC Switch", "Right DAC"}, 927 {"SPKMIX", "SPKMIX Left DAC Switch", "Left DAC"},
924 928
925 /* LONMIX */ 929 /* LONMIX */
926 {"LONMIX", "LONMIX Left Mixer PGA Switch", "LOPGA"}, 930 {"LONMIX", "LONMIX Left Mixer PGA Switch", "LOPGA"},
@@ -1496,10 +1500,9 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind)
1496 client_template.addr = addr; 1500 client_template.addr = addr;
1497 1501
1498 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); 1502 i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
1499 if (i2c == NULL) { 1503 if (i2c == NULL)
1500 kfree(codec);
1501 return -ENOMEM; 1504 return -ENOMEM;
1502 } 1505
1503 i2c_set_clientdata(i2c, codec); 1506 i2c_set_clientdata(i2c, codec);
1504 codec->control_data = i2c; 1507 codec->control_data = i2c;
1505 1508
@@ -1517,7 +1520,6 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind)
1517 return ret; 1520 return ret;
1518 1521
1519err: 1522err:
1520 kfree(codec);
1521 kfree(i2c); 1523 kfree(i2c);
1522 return ret; 1524 return ret;
1523} 1525}
@@ -1591,6 +1593,11 @@ static int wm8990_probe(struct platform_device *pdev)
1591#else 1593#else
1592 /* Add other interfaces here */ 1594 /* Add other interfaces here */
1593#endif 1595#endif
1596
1597 if (ret != 0) {
1598 kfree(codec->private_data);
1599 kfree(codec);
1600 }
1594 return ret; 1601 return ret;
1595} 1602}
1596 1603
diff --git a/sound/soc/codecs/wm8990.h b/sound/soc/codecs/wm8990.h
index 6bea57485283..0a08325d5443 100644
--- a/sound/soc/codecs/wm8990.h
+++ b/sound/soc/codecs/wm8990.h
@@ -54,6 +54,7 @@
54#define WM8990_SPEAKER_VOLUME 0x22 54#define WM8990_SPEAKER_VOLUME 0x22
55#define WM8990_CLASSD1 0x23 55#define WM8990_CLASSD1 0x23
56#define WM8990_CLASSD3 0x25 56#define WM8990_CLASSD3 0x25
57#define WM8990_CLASSD4 0x26
57#define WM8990_INPUT_MIXER1 0x27 58#define WM8990_INPUT_MIXER1 0x27
58#define WM8990_INPUT_MIXER2 0x28 59#define WM8990_INPUT_MIXER2 0x28
59#define WM8990_INPUT_MIXER3 0x29 60#define WM8990_INPUT_MIXER3 0x29
@@ -528,8 +529,8 @@
528/* 529/*
529 * R34 (0x22) - Speaker Volume 530 * R34 (0x22) - Speaker Volume
530 */ 531 */
531#define WM8990_SPKVOL_MASK 0x0003 /* SPKVOL - [1:0] */ 532#define WM8990_SPKATTN_MASK 0x0003 /* SPKATTN - [1:0] */
532#define WM8990_SPKVOL_SHIFT 0 533#define WM8990_SPKATTN_SHIFT 0
533 534
534/* 535/*
535 * R35 (0x23) - ClassD1 536 * R35 (0x23) - ClassD1
@@ -544,6 +545,15 @@
544#define WM8990_DCGAIN_SHIFT 3 545#define WM8990_DCGAIN_SHIFT 3
545#define WM8990_ACGAIN_MASK 0x0007 /* ACGAIN - [2:0] */ 546#define WM8990_ACGAIN_MASK 0x0007 /* ACGAIN - [2:0] */
546#define WM8990_ACGAIN_SHIFT 0 547#define WM8990_ACGAIN_SHIFT 0
548
549/*
550 * R38 (0x26) - ClassD4
551 */
552#define WM8990_SPKZC_MASK 0x0001 /* SPKZC */
553#define WM8990_SPKZC_SHIFT 7 /* SPKZC */
554#define WM8990_SPKVOL_MASK 0x007F /* SPKVOL - [6:0] */
555#define WM8990_SPKVOL_SHIFT 0 /* SPKVOL - [6:0] */
556
547/* 557/*
548 * R39 (0x27) - Input Mixer1 558 * R39 (0x27) - Input Mixer1
549 */ 559 */
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 1fb7f9a7aecd..2f1c91b1d556 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -13,7 +13,6 @@
13 13
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/version.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/device.h> 17#include <linux/device.h>
19#include <sound/core.h> 18#include <sound/core.h>
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index 5e2c306399ed..65fdbd81a379 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -19,9 +19,8 @@
19#include <sound/soc.h> 19#include <sound/soc.h>
20#include <sound/soc-dapm.h> 20#include <sound/soc-dapm.h>
21 21
22#include <asm/mach-types.h>
23#include <asm/dma.h> 22#include <asm/dma.h>
24#include <asm/arch/hardware.h> 23#include <mach/hardware.h>
25 24
26#include "../codecs/tlv320aic3x.h" 25#include "../codecs/tlv320aic3x.h"
27#include "davinci-pcm.h" 26#include "davinci-pcm.h"
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index da2bc5902864..d2d3da9729f2 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -132,12 +132,17 @@ struct fsl_dma_private {
132 * Since each link descriptor has a 32-bit byte count field, we set 132 * Since each link descriptor has a 32-bit byte count field, we set
133 * period_bytes_max to the largest 32-bit number. We also have no maximum 133 * period_bytes_max to the largest 32-bit number. We also have no maximum
134 * number of periods. 134 * number of periods.
135 *
136 * Note that we specify SNDRV_PCM_INFO_JOINT_DUPLEX here, but only because a
137 * limitation in the SSI driver requires the sample rates for playback and
138 * capture to be the same.
135 */ 139 */
136static const struct snd_pcm_hardware fsl_dma_hardware = { 140static const struct snd_pcm_hardware fsl_dma_hardware = {
137 141
138 .info = SNDRV_PCM_INFO_INTERLEAVED | 142 .info = SNDRV_PCM_INFO_INTERLEAVED |
139 SNDRV_PCM_INFO_MMAP | 143 SNDRV_PCM_INFO_MMAP |
140 SNDRV_PCM_INFO_MMAP_VALID, 144 SNDRV_PCM_INFO_MMAP_VALID |
145 SNDRV_PCM_INFO_JOINT_DUPLEX,
141 .formats = FSLDMA_PCM_FORMATS, 146 .formats = FSLDMA_PCM_FORMATS,
142 .rates = FSLDMA_PCM_RATES, 147 .rates = FSLDMA_PCM_RATES,
143 .rate_min = 5512, 148 .rate_min = 5512,
@@ -322,14 +327,75 @@ static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai,
322 * fsl_dma_open: open a new substream. 327 * fsl_dma_open: open a new substream.
323 * 328 *
324 * Each substream has its own DMA buffer. 329 * Each substream has its own DMA buffer.
330 *
331 * ALSA divides the DMA buffer into N periods. We create NUM_DMA_LINKS link
332 * descriptors that ping-pong from one period to the next. For example, if
333 * there are six periods and two link descriptors, this is how they look
334 * before playback starts:
335 *
336 * The last link descriptor
337 * ____________ points back to the first
338 * | |
339 * V |
340 * ___ ___ |
341 * | |->| |->|
342 * |___| |___|
343 * | |
344 * | |
345 * V V
346 * _________________________________________
347 * | | | | | | | The DMA buffer is
348 * | | | | | | | divided into 6 parts
349 * |______|______|______|______|______|______|
350 *
351 * and here's how they look after the first period is finished playing:
352 *
353 * ____________
354 * | |
355 * V |
356 * ___ ___ |
357 * | |->| |->|
358 * |___| |___|
359 * | |
360 * |______________
361 * | |
362 * V V
363 * _________________________________________
364 * | | | | | | |
365 * | | | | | | |
366 * |______|______|______|______|______|______|
367 *
368 * The first link descriptor now points to the third period. The DMA
369 * controller is currently playing the second period. When it finishes, it
370 * will jump back to the first descriptor and play the third period.
371 *
372 * There are four reasons we do this:
373 *
374 * 1. The only way to get the DMA controller to automatically restart the
375 * transfer when it gets to the end of the buffer is to use chaining
376 * mode. Basic direct mode doesn't offer that feature.
377 * 2. We need to receive an interrupt at the end of every period. The DMA
378 * controller can generate an interrupt at the end of every link transfer
379 * (aka segment). Making each period into a DMA segment will give us the
380 * interrupts we need.
381 * 3. By creating only two link descriptors, regardless of the number of
382 * periods, we do not need to reallocate the link descriptors if the
383 * number of periods changes.
384 * 4. All of the audio data is still stored in a single, contiguous DMA
385 * buffer, which is what ALSA expects. We're just dividing it into
386 * contiguous parts, and creating a link descriptor for each one.
325 */ 387 */
326static int fsl_dma_open(struct snd_pcm_substream *substream) 388static int fsl_dma_open(struct snd_pcm_substream *substream)
327{ 389{
328 struct snd_pcm_runtime *runtime = substream->runtime; 390 struct snd_pcm_runtime *runtime = substream->runtime;
329 struct fsl_dma_private *dma_private; 391 struct fsl_dma_private *dma_private;
392 struct ccsr_dma_channel __iomem *dma_channel;
330 dma_addr_t ld_buf_phys; 393 dma_addr_t ld_buf_phys;
394 u64 temp_link; /* Pointer to next link descriptor */
395 u32 mr;
331 unsigned int channel; 396 unsigned int channel;
332 int ret = 0; 397 int ret = 0;
398 unsigned int i;
333 399
334 /* 400 /*
335 * Reject any DMA buffer whose size is not a multiple of the period 401 * Reject any DMA buffer whose size is not a multiple of the period
@@ -390,68 +456,74 @@ static int fsl_dma_open(struct snd_pcm_substream *substream)
390 snd_soc_set_runtime_hwparams(substream, &fsl_dma_hardware); 456 snd_soc_set_runtime_hwparams(substream, &fsl_dma_hardware);
391 runtime->private_data = dma_private; 457 runtime->private_data = dma_private;
392 458
459 /* Program the fixed DMA controller parameters */
460
461 dma_channel = dma_private->dma_channel;
462
463 temp_link = dma_private->ld_buf_phys +
464 sizeof(struct fsl_dma_link_descriptor);
465
466 for (i = 0; i < NUM_DMA_LINKS; i++) {
467 struct fsl_dma_link_descriptor *link = &dma_private->link[i];
468
469 link->source_attr = cpu_to_be32(CCSR_DMA_ATR_SNOOP);
470 link->dest_attr = cpu_to_be32(CCSR_DMA_ATR_SNOOP);
471 link->next = cpu_to_be64(temp_link);
472
473 temp_link += sizeof(struct fsl_dma_link_descriptor);
474 }
475 /* The last link descriptor points to the first */
476 dma_private->link[i - 1].next = cpu_to_be64(dma_private->ld_buf_phys);
477
478 /* Tell the DMA controller where the first link descriptor is */
479 out_be32(&dma_channel->clndar,
480 CCSR_DMA_CLNDAR_ADDR(dma_private->ld_buf_phys));
481 out_be32(&dma_channel->eclndar,
482 CCSR_DMA_ECLNDAR_ADDR(dma_private->ld_buf_phys));
483
484 /* The manual says the BCR must be clear before enabling EMP */
485 out_be32(&dma_channel->bcr, 0);
486
487 /*
488 * Program the mode register for interrupts, external master control,
489 * and source/destination hold. Also clear the Channel Abort bit.
490 */
491 mr = in_be32(&dma_channel->mr) &
492 ~(CCSR_DMA_MR_CA | CCSR_DMA_MR_DAHE | CCSR_DMA_MR_SAHE);
493
494 /*
495 * We want External Master Start and External Master Pause enabled,
496 * because the SSI is controlling the DMA controller. We want the DMA
497 * controller to be set up in advance, and then we signal only the SSI
498 * to start transferring.
499 *
500 * We want End-Of-Segment Interrupts enabled, because this will generate
501 * an interrupt at the end of each segment (each link descriptor
502 * represents one segment). Each DMA segment is the same thing as an
503 * ALSA period, so this is how we get an interrupt at the end of every
504 * period.
505 *
506 * We want Error Interrupt enabled, so that we can get an error if
507 * the DMA controller is mis-programmed somehow.
508 */
509 mr |= CCSR_DMA_MR_EOSIE | CCSR_DMA_MR_EIE | CCSR_DMA_MR_EMP_EN |
510 CCSR_DMA_MR_EMS_EN;
511
512 /* For playback, we want the destination address to be held. For
513 capture, set the source address to be held. */
514 mr |= (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
515 CCSR_DMA_MR_DAHE : CCSR_DMA_MR_SAHE;
516
517 out_be32(&dma_channel->mr, mr);
518
393 return 0; 519 return 0;
394} 520}
395 521
396/** 522/**
397 * fsl_dma_hw_params: allocate the DMA buffer and the DMA link descriptors. 523 * fsl_dma_hw_params: continue initializing the DMA links
398 * 524 *
399 * ALSA divides the DMA buffer into N periods. We create NUM_DMA_LINKS link 525 * This function obtains hardware parameters about the opened stream and
400 * descriptors that ping-pong from one period to the next. For example, if 526 * programs the DMA controller accordingly.
401 * there are six periods and two link descriptors, this is how they look
402 * before playback starts:
403 *
404 * The last link descriptor
405 * ____________ points back to the first
406 * | |
407 * V |
408 * ___ ___ |
409 * | |->| |->|
410 * |___| |___|
411 * | |
412 * | |
413 * V V
414 * _________________________________________
415 * | | | | | | | The DMA buffer is
416 * | | | | | | | divided into 6 parts
417 * |______|______|______|______|______|______|
418 *
419 * and here's how they look after the first period is finished playing:
420 *
421 * ____________
422 * | |
423 * V |
424 * ___ ___ |
425 * | |->| |->|
426 * |___| |___|
427 * | |
428 * |______________
429 * | |
430 * V V
431 * _________________________________________
432 * | | | | | | |
433 * | | | | | | |
434 * |______|______|______|______|______|______|
435 *
436 * The first link descriptor now points to the third period. The DMA
437 * controller is currently playing the second period. When it finishes, it
438 * will jump back to the first descriptor and play the third period.
439 *
440 * There are four reasons we do this:
441 *
442 * 1. The only way to get the DMA controller to automatically restart the
443 * transfer when it gets to the end of the buffer is to use chaining
444 * mode. Basic direct mode doesn't offer that feature.
445 * 2. We need to receive an interrupt at the end of every period. The DMA
446 * controller can generate an interrupt at the end of every link transfer
447 * (aka segment). Making each period into a DMA segment will give us the
448 * interrupts we need.
449 * 3. By creating only two link descriptors, regardless of the number of
450 * periods, we do not need to reallocate the link descriptors if the
451 * number of periods changes.
452 * 4. All of the audio data is still stored in a single, contiguous DMA
453 * buffer, which is what ALSA expects. We're just dividing it into
454 * contiguous parts, and creating a link descriptor for each one.
455 * 527 *
456 * Note that due to a quirk of the SSI's STX register, the target address 528 * Note that due to a quirk of the SSI's STX register, the target address
457 * for the DMA operations depends on the sample size. So we don't program 529 * for the DMA operations depends on the sample size. So we don't program
@@ -463,11 +535,8 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream,
463{ 535{
464 struct snd_pcm_runtime *runtime = substream->runtime; 536 struct snd_pcm_runtime *runtime = substream->runtime;
465 struct fsl_dma_private *dma_private = runtime->private_data; 537 struct fsl_dma_private *dma_private = runtime->private_data;
466 struct ccsr_dma_channel __iomem *dma_channel = dma_private->dma_channel;
467 538
468 dma_addr_t temp_addr; /* Pointer to next period */ 539 dma_addr_t temp_addr; /* Pointer to next period */
469 u64 temp_link; /* Pointer to next link descriptor */
470 u32 mr; /* Temporary variable for MR register */
471 540
472 unsigned int i; 541 unsigned int i;
473 542
@@ -485,8 +554,6 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream,
485 dma_private->dma_buf_next = dma_private->dma_buf_phys; 554 dma_private->dma_buf_next = dma_private->dma_buf_phys;
486 555
487 /* 556 /*
488 * Initialize each link descriptor.
489 *
490 * The actual address in STX0 (destination for playback, source for 557 * The actual address in STX0 (destination for playback, source for
491 * capture) is based on the sample size, but we don't know the sample 558 * capture) is based on the sample size, but we don't know the sample
492 * size in this function, so we'll have to adjust that later. See 559 * size in this function, so we'll have to adjust that later. See
@@ -502,16 +569,11 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream,
502 * buffer itself. 569 * buffer itself.
503 */ 570 */
504 temp_addr = substream->dma_buffer.addr; 571 temp_addr = substream->dma_buffer.addr;
505 temp_link = dma_private->ld_buf_phys +
506 sizeof(struct fsl_dma_link_descriptor);
507 572
508 for (i = 0; i < NUM_DMA_LINKS; i++) { 573 for (i = 0; i < NUM_DMA_LINKS; i++) {
509 struct fsl_dma_link_descriptor *link = &dma_private->link[i]; 574 struct fsl_dma_link_descriptor *link = &dma_private->link[i];
510 575
511 link->count = cpu_to_be32(period_size); 576 link->count = cpu_to_be32(period_size);
512 link->source_attr = cpu_to_be32(CCSR_DMA_ATR_SNOOP);
513 link->dest_attr = cpu_to_be32(CCSR_DMA_ATR_SNOOP);
514 link->next = cpu_to_be64(temp_link);
515 577
516 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 578 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
517 link->source_addr = cpu_to_be32(temp_addr); 579 link->source_addr = cpu_to_be32(temp_addr);
@@ -519,51 +581,7 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream,
519 link->dest_addr = cpu_to_be32(temp_addr); 581 link->dest_addr = cpu_to_be32(temp_addr);
520 582
521 temp_addr += period_size; 583 temp_addr += period_size;
522 temp_link += sizeof(struct fsl_dma_link_descriptor);
523 } 584 }
524 /* The last link descriptor points to the first */
525 dma_private->link[i - 1].next = cpu_to_be64(dma_private->ld_buf_phys);
526
527 /* Tell the DMA controller where the first link descriptor is */
528 out_be32(&dma_channel->clndar,
529 CCSR_DMA_CLNDAR_ADDR(dma_private->ld_buf_phys));
530 out_be32(&dma_channel->eclndar,
531 CCSR_DMA_ECLNDAR_ADDR(dma_private->ld_buf_phys));
532
533 /* The manual says the BCR must be clear before enabling EMP */
534 out_be32(&dma_channel->bcr, 0);
535
536 /*
537 * Program the mode register for interrupts, external master control,
538 * and source/destination hold. Also clear the Channel Abort bit.
539 */
540 mr = in_be32(&dma_channel->mr) &
541 ~(CCSR_DMA_MR_CA | CCSR_DMA_MR_DAHE | CCSR_DMA_MR_SAHE);
542
543 /*
544 * We want External Master Start and External Master Pause enabled,
545 * because the SSI is controlling the DMA controller. We want the DMA
546 * controller to be set up in advance, and then we signal only the SSI
547 * to start transfering.
548 *
549 * We want End-Of-Segment Interrupts enabled, because this will generate
550 * an interrupt at the end of each segment (each link descriptor
551 * represents one segment). Each DMA segment is the same thing as an
552 * ALSA period, so this is how we get an interrupt at the end of every
553 * period.
554 *
555 * We want Error Interrupt enabled, so that we can get an error if
556 * the DMA controller is mis-programmed somehow.
557 */
558 mr |= CCSR_DMA_MR_EOSIE | CCSR_DMA_MR_EIE | CCSR_DMA_MR_EMP_EN |
559 CCSR_DMA_MR_EMS_EN;
560
561 /* For playback, we want the destination address to be held. For
562 capture, set the source address to be held. */
563 mr |= (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
564 CCSR_DMA_MR_DAHE : CCSR_DMA_MR_SAHE;
565
566 out_be32(&dma_channel->mr, mr);
567 585
568 return 0; 586 return 0;
569} 587}
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 71bff33f5528..157a7895ffa1 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -67,6 +67,8 @@
67 * @ssi: pointer to the SSI's registers 67 * @ssi: pointer to the SSI's registers
68 * @ssi_phys: physical address of the SSI registers 68 * @ssi_phys: physical address of the SSI registers
69 * @irq: IRQ of this SSI 69 * @irq: IRQ of this SSI
70 * @first_stream: pointer to the stream that was opened first
71 * @second_stream: pointer to second stream
70 * @dev: struct device pointer 72 * @dev: struct device pointer
71 * @playback: the number of playback streams opened 73 * @playback: the number of playback streams opened
72 * @capture: the number of capture streams opened 74 * @capture: the number of capture streams opened
@@ -79,6 +81,8 @@ struct fsl_ssi_private {
79 struct ccsr_ssi __iomem *ssi; 81 struct ccsr_ssi __iomem *ssi;
80 dma_addr_t ssi_phys; 82 dma_addr_t ssi_phys;
81 unsigned int irq; 83 unsigned int irq;
84 struct snd_pcm_substream *first_stream;
85 struct snd_pcm_substream *second_stream;
82 struct device *dev; 86 struct device *dev;
83 unsigned int playback; 87 unsigned int playback;
84 unsigned int capture; 88 unsigned int capture;
@@ -342,6 +346,49 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream)
342 */ 346 */
343 } 347 }
344 348
349 if (!ssi_private->first_stream)
350 ssi_private->first_stream = substream;
351 else {
352 /* This is the second stream open, so we need to impose sample
353 * rate and maybe sample size constraints. Note that this can
354 * cause a race condition if the second stream is opened before
355 * the first stream is fully initialized.
356 *
357 * We provide some protection by checking to make sure the first
358 * stream is initialized, but it's not perfect. ALSA sometimes
359 * re-initializes the driver with a different sample rate or
360 * size. If the second stream is opened before the first stream
361 * has received its final parameters, then the second stream may
362 * be constrained to the wrong sample rate or size.
363 *
364 * FIXME: This code does not handle opening and closing streams
365 * repeatedly. If you open two streams and then close the first
366 * one, you may not be able to open another stream until you
367 * close the second one as well.
368 */
369 struct snd_pcm_runtime *first_runtime =
370 ssi_private->first_stream->runtime;
371
372 if (!first_runtime->rate || !first_runtime->sample_bits) {
373 dev_err(substream->pcm->card->dev,
374 "set sample rate and size in %s stream first\n",
375 substream->stream == SNDRV_PCM_STREAM_PLAYBACK
376 ? "capture" : "playback");
377 return -EAGAIN;
378 }
379
380 snd_pcm_hw_constraint_minmax(substream->runtime,
381 SNDRV_PCM_HW_PARAM_RATE,
382 first_runtime->rate, first_runtime->rate);
383
384 snd_pcm_hw_constraint_minmax(substream->runtime,
385 SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
386 first_runtime->sample_bits,
387 first_runtime->sample_bits);
388
389 ssi_private->second_stream = substream;
390 }
391
345 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 392 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
346 ssi_private->playback++; 393 ssi_private->playback++;
347 394
@@ -371,18 +418,16 @@ static int fsl_ssi_prepare(struct snd_pcm_substream *substream)
371 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data; 418 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data;
372 419
373 struct ccsr_ssi __iomem *ssi = ssi_private->ssi; 420 struct ccsr_ssi __iomem *ssi = ssi_private->ssi;
374 u32 wl;
375 421
376 wl = CCSR_SSI_SxCCR_WL(snd_pcm_format_width(runtime->format)); 422 if (substream == ssi_private->first_stream) {
423 u32 wl;
377 424
378 clrbits32(&ssi->scr, CCSR_SSI_SCR_SSIEN); 425 /* The SSI should always be disabled at this points (SSIEN=0) */
426 wl = CCSR_SSI_SxCCR_WL(snd_pcm_format_width(runtime->format));
379 427
380 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 428 /* In synchronous mode, the SSI uses STCCR for capture */
381 clrsetbits_be32(&ssi->stccr, CCSR_SSI_SxCCR_WL_MASK, wl); 429 clrsetbits_be32(&ssi->stccr, CCSR_SSI_SxCCR_WL_MASK, wl);
382 else 430 }
383 clrsetbits_be32(&ssi->srccr, CCSR_SSI_SxCCR_WL_MASK, wl);
384
385 setbits32(&ssi->scr, CCSR_SSI_SCR_SSIEN);
386 431
387 return 0; 432 return 0;
388} 433}
@@ -407,9 +452,13 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd)
407 case SNDRV_PCM_TRIGGER_RESUME: 452 case SNDRV_PCM_TRIGGER_RESUME:
408 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 453 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
409 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 454 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
410 setbits32(&ssi->scr, CCSR_SSI_SCR_TE); 455 clrbits32(&ssi->scr, CCSR_SSI_SCR_SSIEN);
456 setbits32(&ssi->scr,
457 CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE);
411 } else { 458 } else {
412 setbits32(&ssi->scr, CCSR_SSI_SCR_RE); 459 clrbits32(&ssi->scr, CCSR_SSI_SCR_SSIEN);
460 setbits32(&ssi->scr,
461 CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_RE);
413 462
414 /* 463 /*
415 * I think we need this delay to allow time for the SSI 464 * I think we need this delay to allow time for the SSI
@@ -452,6 +501,11 @@ static void fsl_ssi_shutdown(struct snd_pcm_substream *substream)
452 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) 501 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
453 ssi_private->capture--; 502 ssi_private->capture--;
454 503
504 if (ssi_private->first_stream == substream)
505 ssi_private->first_stream = ssi_private->second_stream;
506
507 ssi_private->second_stream = NULL;
508
455 /* 509 /*
456 * If this is the last active substream, disable the SSI and release 510 * If this is the last active substream, disable the SSI and release
457 * the IRQ. 511 * the IRQ.
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 02cec96859b8..87d0ed01f65a 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -29,9 +29,9 @@
29#include <sound/soc-dapm.h> 29#include <sound/soc-dapm.h>
30 30
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/arch/hardware.h> 32#include <mach/hardware.h>
33#include <linux/gpio.h> 33#include <linux/gpio.h>
34#include <asm/arch/mcbsp.h> 34#include <mach/mcbsp.h>
35 35
36#include "omap-mcbsp.h" 36#include "omap-mcbsp.h"
37#include "omap-pcm.h" 37#include "omap-pcm.h"
@@ -329,12 +329,14 @@ static int __init n810_soc_init(void)
329 sys_clkout2_src = clk_get(dev, "sys_clkout2_src"); 329 sys_clkout2_src = clk_get(dev, "sys_clkout2_src");
330 if (IS_ERR(sys_clkout2_src)) { 330 if (IS_ERR(sys_clkout2_src)) {
331 dev_err(dev, "Could not get sys_clkout2_src clock\n"); 331 dev_err(dev, "Could not get sys_clkout2_src clock\n");
332 return -ENODEV; 332 err = PTR_ERR(sys_clkout2_src);
333 goto err2;
333 } 334 }
334 sys_clkout2 = clk_get(dev, "sys_clkout2"); 335 sys_clkout2 = clk_get(dev, "sys_clkout2");
335 if (IS_ERR(sys_clkout2)) { 336 if (IS_ERR(sys_clkout2)) {
336 dev_err(dev, "Could not get sys_clkout2\n"); 337 dev_err(dev, "Could not get sys_clkout2\n");
337 goto err1; 338 err = PTR_ERR(sys_clkout2);
339 goto err3;
338 } 340 }
339 /* 341 /*
340 * Configure 12 MHz output on SYS_CLKOUT2. Therefore we must use 342 * Configure 12 MHz output on SYS_CLKOUT2. Therefore we must use
@@ -343,7 +345,8 @@ static int __init n810_soc_init(void)
343 func96m_clk = clk_get(dev, "func_96m_ck"); 345 func96m_clk = clk_get(dev, "func_96m_ck");
344 if (IS_ERR(func96m_clk)) { 346 if (IS_ERR(func96m_clk)) {
345 dev_err(dev, "Could not get func 96M clock\n"); 347 dev_err(dev, "Could not get func 96M clock\n");
346 goto err2; 348 err = PTR_ERR(func96m_clk);
349 goto err4;
347 } 350 }
348 clk_set_parent(sys_clkout2_src, func96m_clk); 351 clk_set_parent(sys_clkout2_src, func96m_clk);
349 clk_set_rate(sys_clkout2, 12000000); 352 clk_set_rate(sys_clkout2, 12000000);
@@ -356,20 +359,25 @@ static int __init n810_soc_init(void)
356 gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0); 359 gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);
357 360
358 return 0; 361 return 0;
359err2: 362err4:
360 clk_put(sys_clkout2); 363 clk_put(sys_clkout2);
364err3:
365 clk_put(sys_clkout2_src);
366err2:
361 platform_device_del(n810_snd_device); 367 platform_device_del(n810_snd_device);
362err1: 368err1:
363 platform_device_put(n810_snd_device); 369 platform_device_put(n810_snd_device);
364 370
365 return err; 371 return err;
366
367} 372}
368 373
369static void __exit n810_soc_exit(void) 374static void __exit n810_soc_exit(void)
370{ 375{
371 gpio_free(N810_SPEAKER_AMP_GPIO); 376 gpio_free(N810_SPEAKER_AMP_GPIO);
372 gpio_free(N810_HEADSET_AMP_GPIO); 377 gpio_free(N810_HEADSET_AMP_GPIO);
378 clk_put(sys_clkout2_src);
379 clk_put(sys_clkout2);
380 clk_put(func96m_clk);
373 381
374 platform_device_unregister(n810_snd_device); 382 platform_device_unregister(n810_snd_device);
375} 383}
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 00b0c9d73cd4..35310e16d7f3 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -30,9 +30,9 @@
30#include <sound/initval.h> 30#include <sound/initval.h>
31#include <sound/soc.h> 31#include <sound/soc.h>
32 32
33#include <asm/arch/control.h> 33#include <mach/control.h>
34#include <asm/arch/dma.h> 34#include <mach/dma.h>
35#include <asm/arch/mcbsp.h> 35#include <mach/mcbsp.h>
36#include "omap-mcbsp.h" 36#include "omap-mcbsp.h"
37#include "omap-pcm.h" 37#include "omap-pcm.h"
38 38
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index e092f3d836d0..690bfeaec4a0 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -27,7 +27,7 @@
27#include <sound/pcm_params.h> 27#include <sound/pcm_params.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29 29
30#include <asm/arch/dma.h> 30#include <mach/dma.h>
31#include "omap-pcm.h" 31#include "omap-pcm.h"
32 32
33static const struct snd_pcm_hardware omap_pcm_hardware = { 33static const struct snd_pcm_hardware omap_pcm_hardware = {
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index c0294464a23a..0a53f72077fd 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -25,10 +25,10 @@
25 25
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/hardware/scoop.h> 27#include <asm/hardware/scoop.h>
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/corgi.h> 30#include <mach/corgi.h>
31#include <asm/arch/audio.h> 31#include <mach/audio.h>
32 32
33#include "../codecs/wm8731.h" 33#include "../codecs/wm8731.h"
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c
index 06e8afb25277..6781c5be242f 100644
--- a/sound/soc/pxa/e800_wm9712.c
+++ b/sound/soc/pxa/e800_wm9712.c
@@ -21,9 +21,9 @@
21#include <sound/soc-dapm.h> 21#include <sound/soc-dapm.h>
22 22
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/arch/pxa-regs.h> 24#include <mach/pxa-regs.h>
25#include <asm/arch/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/audio.h> 26#include <mach/audio.h>
27 27
28#include "../codecs/wm9712.h" 28#include "../codecs/wm9712.h"
29#include "pxa2xx-pcm.h" 29#include "pxa2xx-pcm.h"
diff --git a/sound/soc/pxa/em-x270.c b/sound/soc/pxa/em-x270.c
index 02dcac39cdf6..d9c3f7b28be2 100644
--- a/sound/soc/pxa/em-x270.c
+++ b/sound/soc/pxa/em-x270.c
@@ -30,9 +30,9 @@
30#include <sound/soc-dapm.h> 30#include <sound/soc-dapm.h>
31 31
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/arch/pxa-regs.h> 33#include <mach/pxa-regs.h>
34#include <asm/arch/hardware.h> 34#include <mach/hardware.h>
35#include <asm/arch/audio.h> 35#include <mach/audio.h>
36 36
37#include "../codecs/wm9712.h" 37#include "../codecs/wm9712.h"
38#include "pxa2xx-pcm.h" 38#include "pxa2xx-pcm.h"
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c
index 65a4e9a8c39e..a4697f7e2921 100644
--- a/sound/soc/pxa/poodle.c
+++ b/sound/soc/pxa/poodle.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/hardware/locomo.h> 28#include <asm/hardware/locomo.h>
29#include <asm/arch/pxa-regs.h> 29#include <mach/pxa-regs.h>
30#include <asm/arch/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/poodle.h> 31#include <mach/poodle.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "../codecs/wm8731.h" 34#include "../codecs/wm8731.h"
35#include "pxa2xx-pcm.h" 35#include "pxa2xx-pcm.h"
@@ -85,17 +85,13 @@ static int poodle_startup(struct snd_pcm_substream *substream)
85} 85}
86 86
87/* we need to unmute the HP at shutdown as the mute burns power on poodle */ 87/* we need to unmute the HP at shutdown as the mute burns power on poodle */
88static int poodle_shutdown(struct snd_pcm_substream *substream) 88static void poodle_shutdown(struct snd_pcm_substream *substream)
89{ 89{
90 struct snd_soc_pcm_runtime *rtd = substream->private_data;
91 struct snd_soc_codec *codec = rtd->socdev->codec;
92
93 /* set = unmute headphone */ 90 /* set = unmute headphone */
94 locomo_gpio_write(&poodle_locomo_device.dev, 91 locomo_gpio_write(&poodle_locomo_device.dev,
95 POODLE_LOCOMO_GPIO_MUTE_L, 1); 92 POODLE_LOCOMO_GPIO_MUTE_L, 1);
96 locomo_gpio_write(&poodle_locomo_device.dev, 93 locomo_gpio_write(&poodle_locomo_device.dev,
97 POODLE_LOCOMO_GPIO_MUTE_R, 1); 94 POODLE_LOCOMO_GPIO_MUTE_R, 1);
98 return 0;
99} 95}
100 96
101static int poodle_hw_params(struct snd_pcm_substream *substream, 97static int poodle_hw_params(struct snd_pcm_substream *substream,
@@ -232,7 +228,7 @@ static const struct soc_enum poodle_enum[] = {
232 SOC_ENUM_SINGLE_EXT(2, spk_function), 228 SOC_ENUM_SINGLE_EXT(2, spk_function),
233}; 229};
234 230
235static const snd_kcontrol_new_t wm8731_poodle_controls[] = { 231static const struct snd_kcontrol_new wm8731_poodle_controls[] = {
236 SOC_ENUM_EXT("Jack Function", poodle_enum[0], poodle_get_jack, 232 SOC_ENUM_EXT("Jack Function", poodle_enum[0], poodle_get_jack,
237 poodle_set_jack), 233 poodle_set_jack),
238 SOC_ENUM_EXT("Speaker Function", poodle_enum[1], poodle_get_spk, 234 SOC_ENUM_EXT("Speaker Function", poodle_enum[1], poodle_get_spk,
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 059af815ea0c..d94a495bd6bd 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <linux/mutex.h> 28#include <linux/mutex.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/pxa-regs.h> 30#include <mach/pxa-regs.h>
31#include <asm/arch/pxa2xx-gpio.h> 31#include <mach/pxa2xx-gpio.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
35#include "pxa2xx-ac97.h" 35#include "pxa2xx-ac97.h"
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 8f96d87f7b4b..c796b1882776 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -16,15 +16,16 @@
16#include <linux/device.h> 16#include <linux/device.h>
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 <sound/core.h> 20#include <sound/core.h>
20#include <sound/pcm.h> 21#include <sound/pcm.h>
21#include <sound/initval.h> 22#include <sound/initval.h>
22#include <sound/soc.h> 23#include <sound/soc.h>
23 24
24#include <asm/hardware.h> 25#include <mach/hardware.h>
25#include <asm/arch/pxa-regs.h> 26#include <mach/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h> 27#include <mach/pxa2xx-gpio.h>
27#include <asm/arch/audio.h> 28#include <mach/audio.h>
28 29
29#include "pxa2xx-pcm.h" 30#include "pxa2xx-pcm.h"
30#include "pxa2xx-i2s.h" 31#include "pxa2xx-i2s.h"
@@ -81,7 +82,6 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream)
81 struct snd_soc_pcm_runtime *rtd = substream->private_data; 82 struct snd_soc_pcm_runtime *rtd = substream->private_data;
82 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 83 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
83 84
84 clk_i2s = clk_get(NULL, "I2SCLK");
85 if (IS_ERR(clk_i2s)) 85 if (IS_ERR(clk_i2s))
86 return PTR_ERR(clk_i2s); 86 return PTR_ERR(clk_i2s);
87 87
@@ -152,6 +152,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
152 pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx); 152 pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx);
153 pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm); 153 pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm);
154 pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk); 154 pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk);
155 BUG_ON(IS_ERR(clk_i2s));
155 clk_enable(clk_i2s); 156 clk_enable(clk_i2s);
156 pxa_i2s_wait(); 157 pxa_i2s_wait();
157 158
@@ -317,6 +318,43 @@ struct snd_soc_dai pxa_i2s_dai = {
317 318
318EXPORT_SYMBOL_GPL(pxa_i2s_dai); 319EXPORT_SYMBOL_GPL(pxa_i2s_dai);
319 320
321static int pxa2xx_i2s_probe(struct platform_device *dev)
322{
323 clk_i2s = clk_get(&dev->dev, "I2SCLK");
324 return IS_ERR(clk_i2s) ? PTR_ERR(clk_i2s) : 0;
325}
326
327static int __devexit pxa2xx_i2s_remove(struct platform_device *dev)
328{
329 clk_put(clk_i2s);
330 clk_i2s = ERR_PTR(-ENOENT);
331 return 0;
332}
333
334static struct platform_driver pxa2xx_i2s_driver = {
335 .probe = pxa2xx_i2s_probe,
336 .remove = __devexit_p(pxa2xx_i2s_remove),
337
338 .driver = {
339 .name = "pxa2xx-i2s",
340 .owner = THIS_MODULE,
341 },
342};
343
344static int __init pxa2xx_i2s_init(void)
345{
346 clk_i2s = ERR_PTR(-ENOENT);
347 return platform_driver_register(&pxa2xx_i2s_driver);
348}
349
350static void __exit pxa2xx_i2s_exit(void)
351{
352 platform_driver_unregister(&pxa2xx_i2s_driver);
353}
354
355module_init(pxa2xx_i2s_init);
356module_exit(pxa2xx_i2s_exit);
357
320/* Module information */ 358/* Module information */
321MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com"); 359MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
322MODULE_DESCRIPTION("pxa2xx I2S SoC Interface"); 360MODULE_DESCRIPTION("pxa2xx I2S SoC Interface");
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index 2df03ee5819e..4345f387fe41 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -22,9 +22,9 @@
22#include <sound/soc.h> 22#include <sound/soc.h>
23 23
24#include <asm/dma.h> 24#include <asm/dma.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/pxa-regs.h> 26#include <mach/pxa-regs.h>
27#include <asm/arch/audio.h> 27#include <mach/audio.h>
28 28
29#include "pxa2xx-pcm.h" 29#include "pxa2xx-pcm.h"
30 30
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index 64385797da5d..37cb768fc933 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/hardware/scoop.h> 28#include <asm/hardware/scoop.h>
29#include <asm/arch/pxa-regs.h> 29#include <mach/pxa-regs.h>
30#include <asm/arch/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/akita.h> 31#include <mach/akita.h>
32#include <asm/arch/spitz.h> 32#include <mach/spitz.h>
33#include "../codecs/wm8750.h" 33#include "../codecs/wm8750.h"
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
35#include "pxa2xx-i2s.h" 35#include "pxa2xx-i2s.h"
@@ -297,7 +297,7 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec)
297 snd_soc_dapm_disable_pin(codec, "LINPUT3"); 297 snd_soc_dapm_disable_pin(codec, "LINPUT3");
298 snd_soc_dapm_disable_pin(codec, "RINPUT3"); 298 snd_soc_dapm_disable_pin(codec, "RINPUT3");
299 snd_soc_dapm_disable_pin(codec, "OUT3"); 299 snd_soc_dapm_disable_pin(codec, "OUT3");
300 snd_soc_dapm_disable_pin(codec, "MONO"); 300 snd_soc_dapm_disable_pin(codec, "MONO1");
301 301
302 /* Add spitz specific controls */ 302 /* Add spitz specific controls */
303 for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) { 303 for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) {
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index fe6cca9c9e76..2baaa750f123 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -29,11 +29,10 @@
29#include <sound/soc-dapm.h> 29#include <sound/soc-dapm.h>
30 30
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/arch/tosa.h> 32#include <mach/tosa.h>
33#include <asm/arch/pxa-regs.h> 33#include <mach/pxa-regs.h>
34#include <asm/arch/hardware.h> 34#include <mach/hardware.h>
35#include <asm/arch/audio.h> 35#include <mach/audio.h>
36#include <asm/arch/tosa.h>
37 36
38#include "../codecs/wm9712.h" 37#include "../codecs/wm9712.h"
39#include "pxa2xx-pcm.h" 38#include "pxa2xx-pcm.h"
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 4d7a9aa15f1a..8089f8ee05c0 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -24,14 +24,13 @@
24#include <sound/soc-dapm.h> 24#include <sound/soc-dapm.h>
25#include <sound/tlv.h> 25#include <sound/tlv.h>
26 26
27#include <asm/mach-types.h>
28#include <asm/hardware/scoop.h> 27#include <asm/hardware/scoop.h>
29#include <asm/arch/regs-clock.h> 28#include <mach/regs-clock.h>
30#include <asm/arch/regs-gpio.h> 29#include <mach/regs-gpio.h>
31#include <asm/hardware.h> 30#include <mach/hardware.h>
32#include <asm/arch/audio.h> 31#include <mach/audio.h>
33#include <linux/io.h> 32#include <linux/io.h>
34#include <asm/arch/spi-gpio.h> 33#include <mach/spi-gpio.h>
35 34
36#include <asm/plat-s3c24xx/regs-iis.h> 35#include <asm/plat-s3c24xx/regs-iis.h>
37 36
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index ee4676ed1283..ded7d995a922 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -28,16 +28,16 @@
28#include <sound/pcm_params.h> 28#include <sound/pcm_params.h>
29#include <sound/initval.h> 29#include <sound/initval.h>
30#include <sound/soc.h> 30#include <sound/soc.h>
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32 32
33#include <linux/io.h> 33#include <linux/io.h>
34#include <asm/dma.h> 34#include <asm/dma.h>
35 35
36#include <asm/plat-s3c24xx/regs-s3c2412-iis.h> 36#include <asm/plat-s3c24xx/regs-s3c2412-iis.h>
37 37
38#include <asm/arch/regs-gpio.h> 38#include <mach/regs-gpio.h>
39#include <asm/arch/audio.h> 39#include <mach/audio.h>
40#include <asm/arch/dma.h> 40#include <mach/dma.h>
41 41
42#include "s3c24xx-pcm.h" 42#include "s3c24xx-pcm.h"
43#include "s3c2412-i2s.h" 43#include "s3c2412-i2s.h"
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 783349b7fede..19c5c3cf5d8c 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -27,13 +27,13 @@
27#include <sound/initval.h> 27#include <sound/initval.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/plat-s3c/regs-ac97.h> 31#include <asm/plat-s3c/regs-ac97.h>
32#include <asm/arch/regs-gpio.h> 32#include <mach/regs-gpio.h>
33#include <asm/arch/regs-clock.h> 33#include <mach/regs-clock.h>
34#include <asm/arch/audio.h> 34#include <mach/audio.h>
35#include <asm/dma.h> 35#include <asm/dma.h>
36#include <asm/arch/dma.h> 36#include <mach/dma.h>
37 37
38#include "s3c24xx-pcm.h" 38#include "s3c24xx-pcm.h"
39#include "s3c24xx-ac97.h" 39#include "s3c24xx-ac97.h"
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
index 397524282b57..ba4476b55fbc 100644
--- a/sound/soc/s3c24xx/s3c24xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
@@ -27,12 +27,12 @@
27#include <sound/initval.h> 27#include <sound/initval.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/regs-gpio.h> 31#include <mach/regs-gpio.h>
32#include <asm/arch/regs-clock.h> 32#include <mach/regs-clock.h>
33#include <asm/arch/audio.h> 33#include <mach/audio.h>
34#include <asm/dma.h> 34#include <asm/dma.h>
35#include <asm/arch/dma.h> 35#include <mach/dma.h>
36 36
37#include <asm/plat-s3c24xx/regs-iis.h> 37#include <asm/plat-s3c24xx/regs-iis.h>
38 38
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index cef79b34dc6f..e13e614bada9 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -27,9 +27,9 @@
27#include <sound/soc.h> 27#include <sound/soc.h>
28 28
29#include <asm/dma.h> 29#include <asm/dma.h>
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/dma.h> 31#include <mach/dma.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "s3c24xx-pcm.h" 34#include "s3c24xx-pcm.h"
35 35
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 820347c9ae4b..f9d100bc8479 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -470,6 +470,7 @@ int dapm_reg_event(struct snd_soc_dapm_widget *w,
470 470
471 return 0; 471 return 0;
472} 472}
473EXPORT_SYMBOL_GPL(dapm_reg_event);
473 474
474/* 475/*
475 * Scan each dapm widget for complete audio path. 476 * Scan each dapm widget for complete audio path.