diff options
author | James Morris <jmorris@namei.org> | 2008-08-27 20:47:34 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-08-27 20:47:34 -0400 |
commit | 86d688984deefa3ae5a802880c11f2b408b5d6cf (patch) | |
tree | 7ea5e8189b0a774626d3ed7c3c87df2495a4c4a0 /sound | |
parent | 93c06cbbf9fea5d5be1778febb7fa9ab1a74e5f5 (diff) | |
parent | 4c246edd2550304df5b766cc841584b2bb058843 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'sound')
48 files changed, 420 insertions, 269 deletions
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..909f1c101c95 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]); |
@@ -6437,6 +6439,39 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec) | |||
6437 | } | 6439 | } |
6438 | } | 6440 | } |
6439 | 6441 | ||
6442 | static void alc882_auto_init_input_src(struct hda_codec *codec) | ||
6443 | { | ||
6444 | struct alc_spec *spec = codec->spec; | ||
6445 | const struct hda_input_mux *imux = spec->input_mux; | ||
6446 | int c; | ||
6447 | |||
6448 | for (c = 0; c < spec->num_adc_nids; c++) { | ||
6449 | hda_nid_t conn_list[HDA_MAX_NUM_INPUTS]; | ||
6450 | hda_nid_t nid = spec->capsrc_nids[c]; | ||
6451 | int conns, mute, idx, item; | ||
6452 | |||
6453 | conns = snd_hda_get_connections(codec, nid, conn_list, | ||
6454 | ARRAY_SIZE(conn_list)); | ||
6455 | if (conns < 0) | ||
6456 | continue; | ||
6457 | for (idx = 0; idx < conns; idx++) { | ||
6458 | /* if the current connection is the selected one, | ||
6459 | * unmute it as default - otherwise mute it | ||
6460 | */ | ||
6461 | mute = AMP_IN_MUTE(idx); | ||
6462 | for (item = 0; item < imux->num_items; item++) { | ||
6463 | if (imux->items[item].index == idx) { | ||
6464 | if (spec->cur_mux[c] == item) | ||
6465 | mute = AMP_IN_UNMUTE(idx); | ||
6466 | break; | ||
6467 | } | ||
6468 | } | ||
6469 | snd_hda_codec_write(codec, nid, 0, | ||
6470 | AC_VERB_SET_AMP_GAIN_MUTE, mute); | ||
6471 | } | ||
6472 | } | ||
6473 | } | ||
6474 | |||
6440 | /* add mic boosts if needed */ | 6475 | /* add mic boosts if needed */ |
6441 | static int alc_auto_add_mic_boost(struct hda_codec *codec) | 6476 | static int alc_auto_add_mic_boost(struct hda_codec *codec) |
6442 | { | 6477 | { |
@@ -6491,6 +6526,7 @@ static void alc882_auto_init(struct hda_codec *codec) | |||
6491 | alc882_auto_init_multi_out(codec); | 6526 | alc882_auto_init_multi_out(codec); |
6492 | alc882_auto_init_hp_out(codec); | 6527 | alc882_auto_init_hp_out(codec); |
6493 | alc882_auto_init_analog_input(codec); | 6528 | alc882_auto_init_analog_input(codec); |
6529 | alc882_auto_init_input_src(codec); | ||
6494 | if (spec->unsol_event) | 6530 | if (spec->unsol_event) |
6495 | alc_sku_automute(codec); | 6531 | alc_sku_automute(codec); |
6496 | } | 6532 | } |
@@ -8285,6 +8321,8 @@ static void alc883_auto_init_analog_input(struct hda_codec *codec) | |||
8285 | } | 8321 | } |
8286 | } | 8322 | } |
8287 | 8323 | ||
8324 | #define alc883_auto_init_input_src alc882_auto_init_input_src | ||
8325 | |||
8288 | /* almost identical with ALC880 parser... */ | 8326 | /* almost identical with ALC880 parser... */ |
8289 | static int alc883_parse_auto_config(struct hda_codec *codec) | 8327 | static int alc883_parse_auto_config(struct hda_codec *codec) |
8290 | { | 8328 | { |
@@ -8315,6 +8353,7 @@ static void alc883_auto_init(struct hda_codec *codec) | |||
8315 | alc883_auto_init_multi_out(codec); | 8353 | alc883_auto_init_multi_out(codec); |
8316 | alc883_auto_init_hp_out(codec); | 8354 | alc883_auto_init_hp_out(codec); |
8317 | alc883_auto_init_analog_input(codec); | 8355 | alc883_auto_init_analog_input(codec); |
8356 | alc883_auto_init_input_src(codec); | ||
8318 | if (spec->unsol_event) | 8357 | if (spec->unsol_event) |
8319 | alc_sku_automute(codec); | 8358 | alc_sku_automute(codec); |
8320 | } | 8359 | } |
@@ -8389,8 +8428,6 @@ static int patch_alc883(struct hda_codec *codec) | |||
8389 | codec->patch_ops = alc_patch_ops; | 8428 | codec->patch_ops = alc_patch_ops; |
8390 | if (board_config == ALC883_AUTO) | 8429 | if (board_config == ALC883_AUTO) |
8391 | spec->init_hook = alc883_auto_init; | 8430 | spec->init_hook = alc883_auto_init; |
8392 | else if (codec->vendor_id == 0x10ec0888) | ||
8393 | spec->init_hook = alc888_coef_init; | ||
8394 | 8431 | ||
8395 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 8432 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
8396 | if (!spec->loopback.amplist) | 8433 | if (!spec->loopback.amplist) |
@@ -9663,6 +9700,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec) | |||
9663 | #define alc262_auto_init_multi_out alc882_auto_init_multi_out | 9700 | #define alc262_auto_init_multi_out alc882_auto_init_multi_out |
9664 | #define alc262_auto_init_hp_out alc882_auto_init_hp_out | 9701 | #define alc262_auto_init_hp_out alc882_auto_init_hp_out |
9665 | #define alc262_auto_init_analog_input alc882_auto_init_analog_input | 9702 | #define alc262_auto_init_analog_input alc882_auto_init_analog_input |
9703 | #define alc262_auto_init_input_src alc882_auto_init_input_src | ||
9666 | 9704 | ||
9667 | 9705 | ||
9668 | /* init callback for auto-configuration model -- overriding the default init */ | 9706 | /* init callback for auto-configuration model -- overriding the default init */ |
@@ -9672,6 +9710,7 @@ static void alc262_auto_init(struct hda_codec *codec) | |||
9672 | alc262_auto_init_multi_out(codec); | 9710 | alc262_auto_init_multi_out(codec); |
9673 | alc262_auto_init_hp_out(codec); | 9711 | alc262_auto_init_hp_out(codec); |
9674 | alc262_auto_init_analog_input(codec); | 9712 | alc262_auto_init_analog_input(codec); |
9713 | alc262_auto_init_input_src(codec); | ||
9675 | if (spec->unsol_event) | 9714 | if (spec->unsol_event) |
9676 | alc_sku_automute(codec); | 9715 | alc_sku_automute(codec); |
9677 | } | 9716 | } |
@@ -13330,6 +13369,8 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec) | |||
13330 | } | 13369 | } |
13331 | } | 13370 | } |
13332 | 13371 | ||
13372 | #define alc861vd_auto_init_input_src alc882_auto_init_input_src | ||
13373 | |||
13333 | #define alc861vd_idx_to_mixer_vol(nid) ((nid) + 0x02) | 13374 | #define alc861vd_idx_to_mixer_vol(nid) ((nid) + 0x02) |
13334 | #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) | 13375 | #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) |
13335 | 13376 | ||
@@ -13512,6 +13553,7 @@ static void alc861vd_auto_init(struct hda_codec *codec) | |||
13512 | alc861vd_auto_init_multi_out(codec); | 13553 | alc861vd_auto_init_multi_out(codec); |
13513 | alc861vd_auto_init_hp_out(codec); | 13554 | alc861vd_auto_init_hp_out(codec); |
13514 | alc861vd_auto_init_analog_input(codec); | 13555 | alc861vd_auto_init_analog_input(codec); |
13556 | alc861vd_auto_init_input_src(codec); | ||
13515 | if (spec->unsol_event) | 13557 | if (spec->unsol_event) |
13516 | alc_sku_automute(codec); | 13558 | alc_sku_automute(codec); |
13517 | } | 13559 | } |
@@ -14677,6 +14719,8 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec) | |||
14677 | } | 14719 | } |
14678 | } | 14720 | } |
14679 | 14721 | ||
14722 | #define alc662_auto_init_input_src alc882_auto_init_input_src | ||
14723 | |||
14680 | static int alc662_parse_auto_config(struct hda_codec *codec) | 14724 | static int alc662_parse_auto_config(struct hda_codec *codec) |
14681 | { | 14725 | { |
14682 | struct alc_spec *spec = codec->spec; | 14726 | struct alc_spec *spec = codec->spec; |
@@ -14733,6 +14777,7 @@ static void alc662_auto_init(struct hda_codec *codec) | |||
14733 | alc662_auto_init_multi_out(codec); | 14777 | alc662_auto_init_multi_out(codec); |
14734 | alc662_auto_init_hp_out(codec); | 14778 | alc662_auto_init_hp_out(codec); |
14735 | alc662_auto_init_analog_input(codec); | 14779 | alc662_auto_init_analog_input(codec); |
14780 | alc662_auto_init_input_src(codec); | ||
14736 | if (spec->unsol_event) | 14781 | if (spec->unsol_event) |
14737 | alc_sku_automute(codec); | 14782 | alc_sku_automute(codec); |
14738 | } | 14783 | } |
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 | ||
513 | static void mute_ac97_ctl(struct oxygen *chip, unsigned int control) | 513 | static 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"); | |||
96 | enum { | 96 | enum { |
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 | }; |
108 | MODULE_DEVICE_TABLE(pci, xonar_ids); | 110 | MODULE_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 | ||
316 | static void xonar_dx_init(struct oxygen *chip) | 318 | static 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 | ||
347 | static 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 | |||
348 | static void xonar_cleanup(struct oxygen *chip) | 357 | static 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 | ||
355 | static void xonar_dx_cleanup(struct oxygen *chip) | 364 | static 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 | ||
368 | static void xonar_dx_resume(struct oxygen *chip) | 377 | static 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 | ||
516 | static void xonar_dx_ac97_switch(struct oxygen *chip, | 525 | static 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 | ||
539 | static int xonar_dx_control_filter(struct snd_kcontrol_new *template) | 548 | static 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 | ||
551 | static int xonar_dx_mixer_init(struct oxygen *chip) | 560 | static 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/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 | ||
24 | struct at91_ssc_periph { | 24 | struct 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 | ||
585 | err: | 584 | err: |
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 | ||
1223 | err: | 1222 | err: |
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 | ||
752 | err: | 751 | err: |
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 | ||
716 | err: | 715 | err: |
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 | ||
619 | err: | 618 | err: |
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 | ||
891 | err: | 891 | err: |
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 | ||
1685 | err: | 1683 | err: |
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 | ||
313 | SOC_SINGLE("Speaker Output Attenuation Volume", WM8990_SPEAKER_VOLUME, | 313 | SOC_SINGLE("Speaker Output Attenuation Volume", WM8990_SPEAKER_VOLUME, |
314 | WM8990_SPKVOL_SHIFT, WM8990_SPKVOL_MASK, 0), | 314 | WM8990_SPKATTN_SHIFT, WM8990_SPKATTN_MASK, 0), |
315 | SOC_SINGLE("Speaker DC Boost Volume", WM8990_CLASSD3, | 315 | SOC_SINGLE("Speaker DC Boost Volume", WM8990_CLASSD3, |
316 | WM8990_DCGAIN_SHIFT, WM8990_DCGAIN_MASK, 0), | 316 | WM8990_DCGAIN_SHIFT, WM8990_DCGAIN_MASK, 0), |
317 | SOC_SINGLE("Speaker AC Boost Volume", WM8990_CLASSD3, | 317 | SOC_SINGLE("Speaker AC Boost Volume", WM8990_CLASSD3, |
318 | WM8990_ACGAIN_SHIFT, WM8990_ACGAIN_MASK, 0), | 318 | WM8990_ACGAIN_SHIFT, WM8990_ACGAIN_MASK, 0), |
319 | SOC_SINGLE_TLV("Speaker Volume", WM8990_CLASSD4, | ||
320 | WM8990_SPKVOL_SHIFT, WM8990_SPKVOL_MASK, 0, out_pga_tlv), | ||
321 | SOC_SINGLE("Speaker ZC Switch", WM8990_CLASSD4, | ||
322 | WM8990_SPKZC_SHIFT, WM8990_SPKZC_MASK, 0), | ||
319 | 323 | ||
320 | SOC_WM899X_OUTPGA_SINGLE_R_TLV("Left DAC Digital Volume", | 324 | SOC_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 | ||
1519 | err: | 1522 | err: |
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 7ceea2bba1f5..d2d3da9729f2 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -327,14 +327,75 @@ static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai, | |||
327 | * fsl_dma_open: open a new substream. | 327 | * fsl_dma_open: open a new substream. |
328 | * | 328 | * |
329 | * 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. | ||
330 | */ | 387 | */ |
331 | static int fsl_dma_open(struct snd_pcm_substream *substream) | 388 | static int fsl_dma_open(struct snd_pcm_substream *substream) |
332 | { | 389 | { |
333 | struct snd_pcm_runtime *runtime = substream->runtime; | 390 | struct snd_pcm_runtime *runtime = substream->runtime; |
334 | struct fsl_dma_private *dma_private; | 391 | struct fsl_dma_private *dma_private; |
392 | struct ccsr_dma_channel __iomem *dma_channel; | ||
335 | 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; | ||
336 | unsigned int channel; | 396 | unsigned int channel; |
337 | int ret = 0; | 397 | int ret = 0; |
398 | unsigned int i; | ||
338 | 399 | ||
339 | /* | 400 | /* |
340 | * 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 |
@@ -395,68 +456,74 @@ static int fsl_dma_open(struct snd_pcm_substream *substream) | |||
395 | snd_soc_set_runtime_hwparams(substream, &fsl_dma_hardware); | 456 | snd_soc_set_runtime_hwparams(substream, &fsl_dma_hardware); |
396 | runtime->private_data = dma_private; | 457 | runtime->private_data = dma_private; |
397 | 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 | |||
398 | return 0; | 519 | return 0; |
399 | } | 520 | } |
400 | 521 | ||
401 | /** | 522 | /** |
402 | * fsl_dma_hw_params: allocate the DMA buffer and the DMA link descriptors. | 523 | * fsl_dma_hw_params: continue initializing the DMA links |
403 | * | ||
404 | * ALSA divides the DMA buffer into N periods. We create NUM_DMA_LINKS link | ||
405 | * descriptors that ping-pong from one period to the next. For example, if | ||
406 | * there are six periods and two link descriptors, this is how they look | ||
407 | * before playback starts: | ||
408 | * | ||
409 | * The last link descriptor | ||
410 | * ____________ points back to the first | ||
411 | * | | | ||
412 | * V | | ||
413 | * ___ ___ | | ||
414 | * | |->| |->| | ||
415 | * |___| |___| | ||
416 | * | | | ||
417 | * | | | ||
418 | * V V | ||
419 | * _________________________________________ | ||
420 | * | | | | | | | The DMA buffer is | ||
421 | * | | | | | | | divided into 6 parts | ||
422 | * |______|______|______|______|______|______| | ||
423 | * | ||
424 | * and here's how they look after the first period is finished playing: | ||
425 | * | ||
426 | * ____________ | ||
427 | * | | | ||
428 | * V | | ||
429 | * ___ ___ | | ||
430 | * | |->| |->| | ||
431 | * |___| |___| | ||
432 | * | | | ||
433 | * |______________ | ||
434 | * | | | ||
435 | * V V | ||
436 | * _________________________________________ | ||
437 | * | | | | | | | | ||
438 | * | | | | | | | | ||
439 | * |______|______|______|______|______|______| | ||
440 | * | 524 | * |
441 | * The first link descriptor now points to the third period. The DMA | 525 | * This function obtains hardware parameters about the opened stream and |
442 | * controller is currently playing the second period. When it finishes, it | 526 | * programs the DMA controller accordingly. |
443 | * will jump back to the first descriptor and play the third period. | ||
444 | * | ||
445 | * There are four reasons we do this: | ||
446 | * | ||
447 | * 1. The only way to get the DMA controller to automatically restart the | ||
448 | * transfer when it gets to the end of the buffer is to use chaining | ||
449 | * mode. Basic direct mode doesn't offer that feature. | ||
450 | * 2. We need to receive an interrupt at the end of every period. The DMA | ||
451 | * controller can generate an interrupt at the end of every link transfer | ||
452 | * (aka segment). Making each period into a DMA segment will give us the | ||
453 | * interrupts we need. | ||
454 | * 3. By creating only two link descriptors, regardless of the number of | ||
455 | * periods, we do not need to reallocate the link descriptors if the | ||
456 | * number of periods changes. | ||
457 | * 4. All of the audio data is still stored in a single, contiguous DMA | ||
458 | * buffer, which is what ALSA expects. We're just dividing it into | ||
459 | * contiguous parts, and creating a link descriptor for each one. | ||
460 | * | 527 | * |
461 | * 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 |
462 | * 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 |
@@ -468,11 +535,8 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream, | |||
468 | { | 535 | { |
469 | struct snd_pcm_runtime *runtime = substream->runtime; | 536 | struct snd_pcm_runtime *runtime = substream->runtime; |
470 | struct fsl_dma_private *dma_private = runtime->private_data; | 537 | struct fsl_dma_private *dma_private = runtime->private_data; |
471 | struct ccsr_dma_channel __iomem *dma_channel = dma_private->dma_channel; | ||
472 | 538 | ||
473 | dma_addr_t temp_addr; /* Pointer to next period */ | 539 | dma_addr_t temp_addr; /* Pointer to next period */ |
474 | u64 temp_link; /* Pointer to next link descriptor */ | ||
475 | u32 mr; /* Temporary variable for MR register */ | ||
476 | 540 | ||
477 | unsigned int i; | 541 | unsigned int i; |
478 | 542 | ||
@@ -490,8 +554,6 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream, | |||
490 | dma_private->dma_buf_next = dma_private->dma_buf_phys; | 554 | dma_private->dma_buf_next = dma_private->dma_buf_phys; |
491 | 555 | ||
492 | /* | 556 | /* |
493 | * Initialize each link descriptor. | ||
494 | * | ||
495 | * The actual address in STX0 (destination for playback, source for | 557 | * The actual address in STX0 (destination for playback, source for |
496 | * 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 |
497 | * 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 |
@@ -507,16 +569,11 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream, | |||
507 | * buffer itself. | 569 | * buffer itself. |
508 | */ | 570 | */ |
509 | temp_addr = substream->dma_buffer.addr; | 571 | temp_addr = substream->dma_buffer.addr; |
510 | temp_link = dma_private->ld_buf_phys + | ||
511 | sizeof(struct fsl_dma_link_descriptor); | ||
512 | 572 | ||
513 | for (i = 0; i < NUM_DMA_LINKS; i++) { | 573 | for (i = 0; i < NUM_DMA_LINKS; i++) { |
514 | struct fsl_dma_link_descriptor *link = &dma_private->link[i]; | 574 | struct fsl_dma_link_descriptor *link = &dma_private->link[i]; |
515 | 575 | ||
516 | link->count = cpu_to_be32(period_size); | 576 | link->count = cpu_to_be32(period_size); |
517 | link->source_attr = cpu_to_be32(CCSR_DMA_ATR_SNOOP); | ||
518 | link->dest_attr = cpu_to_be32(CCSR_DMA_ATR_SNOOP); | ||
519 | link->next = cpu_to_be64(temp_link); | ||
520 | 577 | ||
521 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 578 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
522 | link->source_addr = cpu_to_be32(temp_addr); | 579 | link->source_addr = cpu_to_be32(temp_addr); |
@@ -524,51 +581,7 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream, | |||
524 | link->dest_addr = cpu_to_be32(temp_addr); | 581 | link->dest_addr = cpu_to_be32(temp_addr); |
525 | 582 | ||
526 | temp_addr += period_size; | 583 | temp_addr += period_size; |
527 | temp_link += sizeof(struct fsl_dma_link_descriptor); | ||
528 | } | 584 | } |
529 | /* The last link descriptor points to the first */ | ||
530 | dma_private->link[i - 1].next = cpu_to_be64(dma_private->ld_buf_phys); | ||
531 | |||
532 | /* Tell the DMA controller where the first link descriptor is */ | ||
533 | out_be32(&dma_channel->clndar, | ||
534 | CCSR_DMA_CLNDAR_ADDR(dma_private->ld_buf_phys)); | ||
535 | out_be32(&dma_channel->eclndar, | ||
536 | CCSR_DMA_ECLNDAR_ADDR(dma_private->ld_buf_phys)); | ||
537 | |||
538 | /* The manual says the BCR must be clear before enabling EMP */ | ||
539 | out_be32(&dma_channel->bcr, 0); | ||
540 | |||
541 | /* | ||
542 | * Program the mode register for interrupts, external master control, | ||
543 | * and source/destination hold. Also clear the Channel Abort bit. | ||
544 | */ | ||
545 | mr = in_be32(&dma_channel->mr) & | ||
546 | ~(CCSR_DMA_MR_CA | CCSR_DMA_MR_DAHE | CCSR_DMA_MR_SAHE); | ||
547 | |||
548 | /* | ||
549 | * We want External Master Start and External Master Pause enabled, | ||
550 | * because the SSI is controlling the DMA controller. We want the DMA | ||
551 | * controller to be set up in advance, and then we signal only the SSI | ||
552 | * to start transfering. | ||
553 | * | ||
554 | * We want End-Of-Segment Interrupts enabled, because this will generate | ||
555 | * an interrupt at the end of each segment (each link descriptor | ||
556 | * represents one segment). Each DMA segment is the same thing as an | ||
557 | * ALSA period, so this is how we get an interrupt at the end of every | ||
558 | * period. | ||
559 | * | ||
560 | * We want Error Interrupt enabled, so that we can get an error if | ||
561 | * the DMA controller is mis-programmed somehow. | ||
562 | */ | ||
563 | mr |= CCSR_DMA_MR_EOSIE | CCSR_DMA_MR_EIE | CCSR_DMA_MR_EMP_EN | | ||
564 | CCSR_DMA_MR_EMS_EN; | ||
565 | |||
566 | /* For playback, we want the destination address to be held. For | ||
567 | capture, set the source address to be held. */ | ||
568 | mr |= (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? | ||
569 | CCSR_DMA_MR_DAHE : CCSR_DMA_MR_SAHE; | ||
570 | |||
571 | out_be32(&dma_channel->mr, mr); | ||
572 | 585 | ||
573 | return 0; | 586 | return 0; |
574 | } | 587 | } |
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; |
359 | err2: | 362 | err4: |
360 | clk_put(sys_clkout2); | 363 | clk_put(sys_clkout2); |
364 | err3: | ||
365 | clk_put(sys_clkout2_src); | ||
366 | err2: | ||
361 | platform_device_del(n810_snd_device); | 367 | platform_device_del(n810_snd_device); |
362 | err1: | 368 | err1: |
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 | ||
369 | static void __exit n810_soc_exit(void) | 374 | static 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 | ||
33 | static const struct snd_pcm_hardware omap_pcm_hardware = { | 33 | static 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 d968cf71b569..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" |
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..8548818eea08 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
@@ -21,10 +21,10 @@ | |||
21 | #include <sound/initval.h> | 21 | #include <sound/initval.h> |
22 | #include <sound/soc.h> | 22 | #include <sound/soc.h> |
23 | 23 | ||
24 | #include <asm/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <asm/arch/pxa-regs.h> | 25 | #include <mach/pxa-regs.h> |
26 | #include <asm/arch/pxa2xx-gpio.h> | 26 | #include <mach/pxa2xx-gpio.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 | #include "pxa2xx-i2s.h" | 30 | #include "pxa2xx-i2s.h" |
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 22971a0f040e..2baaa750f123 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c | |||
@@ -29,10 +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 | 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/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 | ||