diff options
Diffstat (limited to 'sound')
37 files changed, 291 insertions, 219 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/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 87e3aefeddc3..83e90057270e 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -189,9 +189,7 @@ void snd_tea575x_init(struct snd_tea575x *tea) | |||
189 | } | 189 | } |
190 | 190 | ||
191 | memset(&tea->vd, 0, sizeof(tea->vd)); | 191 | memset(&tea->vd, 0, sizeof(tea->vd)); |
192 | tea->vd.owner = tea->card->module; | ||
193 | strcpy(tea->vd.name, tea->tea5759 ? "TEA5759 radio" : "TEA5757 radio"); | 192 | strcpy(tea->vd.name, tea->tea5759 ? "TEA5759 radio" : "TEA5757 radio"); |
194 | tea->vd.type = VID_TYPE_TUNER; | ||
195 | tea->vd.release = snd_tea575x_release; | 193 | tea->vd.release = snd_tea575x_release; |
196 | video_set_drvdata(&tea->vd, tea); | 194 | video_set_drvdata(&tea->vd, tea); |
197 | tea->vd.fops = &tea->fops; | 195 | tea->vd.fops = &tea->fops; |
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/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index ef9f072b47fc..a73d6ca0a906 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}," |
@@ -2263,6 +2264,8 @@ static struct pci_device_id azx_ids[] = { | |||
2263 | { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH }, | 2264 | { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH }, |
2264 | { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH }, | 2265 | { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH }, |
2265 | { PCI_DEVICE(0x8086, 0x3a6e), .driver_data = AZX_DRIVER_ICH }, | 2266 | { PCI_DEVICE(0x8086, 0x3a6e), .driver_data = AZX_DRIVER_ICH }, |
2267 | /* PCH */ | ||
2268 | { PCI_DEVICE(0x8086, 0x3b56), .driver_data = AZX_DRIVER_ICH }, | ||
2266 | /* SCH */ | 2269 | /* SCH */ |
2267 | { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH }, | 2270 | { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH }, |
2268 | /* ATI SB 450/600 */ | 2271 | /* ATI SB 450/600 */ |
@@ -2272,6 +2275,7 @@ static struct pci_device_id azx_ids[] = { | |||
2272 | { PCI_DEVICE(0x1002, 0x793b), .driver_data = AZX_DRIVER_ATIHDMI }, | 2275 | { PCI_DEVICE(0x1002, 0x793b), .driver_data = AZX_DRIVER_ATIHDMI }, |
2273 | { PCI_DEVICE(0x1002, 0x7919), .driver_data = AZX_DRIVER_ATIHDMI }, | 2276 | { PCI_DEVICE(0x1002, 0x7919), .driver_data = AZX_DRIVER_ATIHDMI }, |
2274 | { PCI_DEVICE(0x1002, 0x960f), .driver_data = AZX_DRIVER_ATIHDMI }, | 2277 | { PCI_DEVICE(0x1002, 0x960f), .driver_data = AZX_DRIVER_ATIHDMI }, |
2278 | { PCI_DEVICE(0x1002, 0x970f), .driver_data = AZX_DRIVER_ATIHDMI }, | ||
2275 | { PCI_DEVICE(0x1002, 0xaa00), .driver_data = AZX_DRIVER_ATIHDMI }, | 2279 | { PCI_DEVICE(0x1002, 0xaa00), .driver_data = AZX_DRIVER_ATIHDMI }, |
2276 | { PCI_DEVICE(0x1002, 0xaa08), .driver_data = AZX_DRIVER_ATIHDMI }, | 2280 | { PCI_DEVICE(0x1002, 0xaa08), .driver_data = AZX_DRIVER_ATIHDMI }, |
2277 | { PCI_DEVICE(0x1002, 0xaa10), .driver_data = AZX_DRIVER_ATIHDMI }, | 2281 | { PCI_DEVICE(0x1002, 0xaa10), .driver_data = AZX_DRIVER_ATIHDMI }, |
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 | ||
48 | MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>"); | 48 | MODULE_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 | ||
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..b081e83766b7 100644 --- a/sound/soc/at91/eti_b1_wm8731.c +++ b/sound/soc/at91/eti_b1_wm8731.c | |||
@@ -33,8 +33,8 @@ | |||
33 | #include <sound/soc.h> | 33 | #include <sound/soc.h> |
34 | #include <sound/soc-dapm.h> | 34 | #include <sound/soc-dapm.h> |
35 | 35 | ||
36 | #include <asm/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <asm/arch/gpio.h> | 37 | #include <mach/gpio.h> |
38 | 38 | ||
39 | #include "../codecs/wm8731.h" | 39 | #include "../codecs/wm8731.h" |
40 | #include "at91-pcm.h" | 40 | #include "at91-pcm.h" |
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index e23cb09f0d14..c6a8edf302ad 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"), |
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 | */ |
136 | static const struct snd_pcm_hardware fsl_dma_hardware = { | 140 | static 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 | */ |
326 | static int fsl_dma_open(struct snd_pcm_substream *substream) | 388 | static 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..7694621ec40b 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" |
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 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 */ |
88 | static int poodle_shutdown(struct snd_pcm_substream *substream) | 88 | static 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 | ||
101 | static int poodle_hw_params(struct snd_pcm_substream *substream, | 97 | static 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 | ||
235 | static const snd_kcontrol_new_t wm8731_poodle_controls[] = { | 231 | static 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..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 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 | } |
473 | EXPORT_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. |