diff options
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/efika-audio-fabric.c | 2 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_dma.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 124 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.h | 24 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_ac97.c | 39 | ||||
-rw-r--r-- | sound/soc/fsl/mpc8610_hpcd.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/pcm030-audio-fabric.c | 2 | ||||
-rw-r--r-- | sound/soc/fsl/soc-of-simple.c | 1 |
9 files changed, 69 insertions, 126 deletions
diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c index 3326e2a1e863..1a5b8e0d6a34 100644 --- a/sound/soc/fsl/efika-audio-fabric.c +++ b/sound/soc/fsl/efika-audio-fabric.c | |||
@@ -55,7 +55,7 @@ static __init int efika_fabric_init(void) | |||
55 | struct platform_device *pdev; | 55 | struct platform_device *pdev; |
56 | int rc; | 56 | int rc; |
57 | 57 | ||
58 | if (!machine_is_compatible("bplan,efika")) | 58 | if (!of_machine_is_compatible("bplan,efika")) |
59 | return -ENODEV; | 59 | return -ENODEV; |
60 | 60 | ||
61 | card.platform = &mpc5200_audio_dma_platform; | 61 | card.platform = &mpc5200_audio_dma_platform; |
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index b1a3a278819f..410c7496a18d 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/gfp.h> | ||
22 | 23 | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 93f0f38a32c9..762c1b8e8e4e 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 6096d22283e6..d639e55c5124 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/of_device.h> | 10 | #include <linux/of_device.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #include <sound/soc.h> | 13 | #include <sound/soc.h> |
13 | 14 | ||
@@ -58,47 +59,15 @@ static void psc_dma_bcom_enqueue_next_buffer(struct psc_dma_stream *s) | |||
58 | /* Prepare and enqueue the next buffer descriptor */ | 59 | /* Prepare and enqueue the next buffer descriptor */ |
59 | bd = bcom_prepare_next_buffer(s->bcom_task); | 60 | bd = bcom_prepare_next_buffer(s->bcom_task); |
60 | bd->status = s->period_bytes; | 61 | bd->status = s->period_bytes; |
61 | bd->data[0] = s->period_next_pt; | 62 | bd->data[0] = s->runtime->dma_addr + (s->period_next * s->period_bytes); |
62 | bcom_submit_next_buffer(s->bcom_task, NULL); | 63 | bcom_submit_next_buffer(s->bcom_task, NULL); |
63 | 64 | ||
64 | /* Update for next period */ | 65 | /* Update for next period */ |
65 | s->period_next_pt += s->period_bytes; | 66 | s->period_next = (s->period_next + 1) % s->runtime->periods; |
66 | if (s->period_next_pt >= s->period_end) | ||
67 | s->period_next_pt = s->period_start; | ||
68 | } | ||
69 | |||
70 | static void psc_dma_bcom_enqueue_tx(struct psc_dma_stream *s) | ||
71 | { | ||
72 | if (s->appl_ptr > s->runtime->control->appl_ptr) { | ||
73 | /* | ||
74 | * In this case s->runtime->control->appl_ptr has wrapped around. | ||
75 | * Play the data to the end of the boundary, then wrap our own | ||
76 | * appl_ptr back around. | ||
77 | */ | ||
78 | while (s->appl_ptr < s->runtime->boundary) { | ||
79 | if (bcom_queue_full(s->bcom_task)) | ||
80 | return; | ||
81 | |||
82 | s->appl_ptr += s->period_size; | ||
83 | |||
84 | psc_dma_bcom_enqueue_next_buffer(s); | ||
85 | } | ||
86 | s->appl_ptr -= s->runtime->boundary; | ||
87 | } | ||
88 | |||
89 | while (s->appl_ptr < s->runtime->control->appl_ptr) { | ||
90 | |||
91 | if (bcom_queue_full(s->bcom_task)) | ||
92 | return; | ||
93 | |||
94 | s->appl_ptr += s->period_size; | ||
95 | |||
96 | psc_dma_bcom_enqueue_next_buffer(s); | ||
97 | } | ||
98 | } | 67 | } |
99 | 68 | ||
100 | /* Bestcomm DMA irq handler */ | 69 | /* Bestcomm DMA irq handler */ |
101 | static irqreturn_t psc_dma_bcom_irq_tx(int irq, void *_psc_dma_stream) | 70 | static irqreturn_t psc_dma_bcom_irq(int irq, void *_psc_dma_stream) |
102 | { | 71 | { |
103 | struct psc_dma_stream *s = _psc_dma_stream; | 72 | struct psc_dma_stream *s = _psc_dma_stream; |
104 | 73 | ||
@@ -108,34 +77,8 @@ static irqreturn_t psc_dma_bcom_irq_tx(int irq, void *_psc_dma_stream) | |||
108 | while (bcom_buffer_done(s->bcom_task)) { | 77 | while (bcom_buffer_done(s->bcom_task)) { |
109 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); | 78 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); |
110 | 79 | ||
111 | s->period_current_pt += s->period_bytes; | 80 | s->period_current = (s->period_current+1) % s->runtime->periods; |
112 | if (s->period_current_pt >= s->period_end) | 81 | s->period_count++; |
113 | s->period_current_pt = s->period_start; | ||
114 | } | ||
115 | psc_dma_bcom_enqueue_tx(s); | ||
116 | spin_unlock(&s->psc_dma->lock); | ||
117 | |||
118 | /* If the stream is active, then also inform the PCM middle layer | ||
119 | * of the period finished event. */ | ||
120 | if (s->active) | ||
121 | snd_pcm_period_elapsed(s->stream); | ||
122 | |||
123 | return IRQ_HANDLED; | ||
124 | } | ||
125 | |||
126 | static irqreturn_t psc_dma_bcom_irq_rx(int irq, void *_psc_dma_stream) | ||
127 | { | ||
128 | struct psc_dma_stream *s = _psc_dma_stream; | ||
129 | |||
130 | spin_lock(&s->psc_dma->lock); | ||
131 | /* For each finished period, dequeue the completed period buffer | ||
132 | * and enqueue a new one in it's place. */ | ||
133 | while (bcom_buffer_done(s->bcom_task)) { | ||
134 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); | ||
135 | |||
136 | s->period_current_pt += s->period_bytes; | ||
137 | if (s->period_current_pt >= s->period_end) | ||
138 | s->period_current_pt = s->period_start; | ||
139 | 82 | ||
140 | psc_dma_bcom_enqueue_next_buffer(s); | 83 | psc_dma_bcom_enqueue_next_buffer(s); |
141 | } | 84 | } |
@@ -166,54 +109,38 @@ static int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd) | |||
166 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 109 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
167 | struct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data; | 110 | struct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data; |
168 | struct snd_pcm_runtime *runtime = substream->runtime; | 111 | struct snd_pcm_runtime *runtime = substream->runtime; |
169 | struct psc_dma_stream *s; | 112 | struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); |
170 | struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; | 113 | struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; |
171 | u16 imr; | 114 | u16 imr; |
172 | unsigned long flags; | 115 | unsigned long flags; |
173 | int i; | 116 | int i; |
174 | 117 | ||
175 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) | ||
176 | s = &psc_dma->capture; | ||
177 | else | ||
178 | s = &psc_dma->playback; | ||
179 | |||
180 | dev_dbg(psc_dma->dev, "psc_dma_trigger(substream=%p, cmd=%i)" | ||
181 | " stream_id=%i\n", | ||
182 | substream, cmd, substream->pstr->stream); | ||
183 | |||
184 | switch (cmd) { | 118 | switch (cmd) { |
185 | case SNDRV_PCM_TRIGGER_START: | 119 | case SNDRV_PCM_TRIGGER_START: |
120 | dev_dbg(psc_dma->dev, "START: stream=%i fbits=%u ps=%u #p=%u\n", | ||
121 | substream->pstr->stream, runtime->frame_bits, | ||
122 | (int)runtime->period_size, runtime->periods); | ||
186 | s->period_bytes = frames_to_bytes(runtime, | 123 | s->period_bytes = frames_to_bytes(runtime, |
187 | runtime->period_size); | 124 | runtime->period_size); |
188 | s->period_start = virt_to_phys(runtime->dma_area); | 125 | s->period_next = 0; |
189 | s->period_end = s->period_start + | 126 | s->period_current = 0; |
190 | (s->period_bytes * runtime->periods); | ||
191 | s->period_next_pt = s->period_start; | ||
192 | s->period_current_pt = s->period_start; | ||
193 | s->period_size = runtime->period_size; | ||
194 | s->active = 1; | 127 | s->active = 1; |
195 | 128 | s->period_count = 0; | |
196 | /* track appl_ptr so that we have a better chance of detecting | ||
197 | * end of stream and not over running it. | ||
198 | */ | ||
199 | s->runtime = runtime; | 129 | s->runtime = runtime; |
200 | s->appl_ptr = s->runtime->control->appl_ptr - | ||
201 | (runtime->period_size * runtime->periods); | ||
202 | 130 | ||
203 | /* Fill up the bestcomm bd queue and enable DMA. | 131 | /* Fill up the bestcomm bd queue and enable DMA. |
204 | * This will begin filling the PSC's fifo. | 132 | * This will begin filling the PSC's fifo. |
205 | */ | 133 | */ |
206 | spin_lock_irqsave(&psc_dma->lock, flags); | 134 | spin_lock_irqsave(&psc_dma->lock, flags); |
207 | 135 | ||
208 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) { | 136 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) |
209 | bcom_gen_bd_rx_reset(s->bcom_task); | 137 | bcom_gen_bd_rx_reset(s->bcom_task); |
210 | for (i = 0; i < runtime->periods; i++) | 138 | else |
211 | if (!bcom_queue_full(s->bcom_task)) | ||
212 | psc_dma_bcom_enqueue_next_buffer(s); | ||
213 | } else { | ||
214 | bcom_gen_bd_tx_reset(s->bcom_task); | 139 | bcom_gen_bd_tx_reset(s->bcom_task); |
215 | psc_dma_bcom_enqueue_tx(s); | 140 | |
216 | } | 141 | for (i = 0; i < runtime->periods; i++) |
142 | if (!bcom_queue_full(s->bcom_task)) | ||
143 | psc_dma_bcom_enqueue_next_buffer(s); | ||
217 | 144 | ||
218 | bcom_enable(s->bcom_task); | 145 | bcom_enable(s->bcom_task); |
219 | spin_unlock_irqrestore(&psc_dma->lock, flags); | 146 | spin_unlock_irqrestore(&psc_dma->lock, flags); |
@@ -223,6 +150,8 @@ static int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd) | |||
223 | break; | 150 | break; |
224 | 151 | ||
225 | case SNDRV_PCM_TRIGGER_STOP: | 152 | case SNDRV_PCM_TRIGGER_STOP: |
153 | dev_dbg(psc_dma->dev, "STOP: stream=%i periods_count=%i\n", | ||
154 | substream->pstr->stream, s->period_count); | ||
226 | s->active = 0; | 155 | s->active = 0; |
227 | 156 | ||
228 | spin_lock_irqsave(&psc_dma->lock, flags); | 157 | spin_lock_irqsave(&psc_dma->lock, flags); |
@@ -236,7 +165,8 @@ static int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd) | |||
236 | break; | 165 | break; |
237 | 166 | ||
238 | default: | 167 | default: |
239 | dev_dbg(psc_dma->dev, "invalid command\n"); | 168 | dev_dbg(psc_dma->dev, "unhandled trigger: stream=%i cmd=%i\n", |
169 | substream->pstr->stream, cmd); | ||
240 | return -EINVAL; | 170 | return -EINVAL; |
241 | } | 171 | } |
242 | 172 | ||
@@ -343,7 +273,7 @@ psc_dma_pointer(struct snd_pcm_substream *substream) | |||
343 | else | 273 | else |
344 | s = &psc_dma->playback; | 274 | s = &psc_dma->playback; |
345 | 275 | ||
346 | count = s->period_current_pt - s->period_start; | 276 | count = s->period_current * s->period_bytes; |
347 | 277 | ||
348 | return bytes_to_frames(substream->runtime, count); | 278 | return bytes_to_frames(substream->runtime, count); |
349 | } | 279 | } |
@@ -532,11 +462,9 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
532 | 462 | ||
533 | rc = request_irq(psc_dma->irq, &psc_dma_status_irq, IRQF_SHARED, | 463 | rc = request_irq(psc_dma->irq, &psc_dma_status_irq, IRQF_SHARED, |
534 | "psc-dma-status", psc_dma); | 464 | "psc-dma-status", psc_dma); |
535 | rc |= request_irq(psc_dma->capture.irq, | 465 | rc |= request_irq(psc_dma->capture.irq, &psc_dma_bcom_irq, IRQF_SHARED, |
536 | &psc_dma_bcom_irq_rx, IRQF_SHARED, | ||
537 | "psc-dma-capture", &psc_dma->capture); | 466 | "psc-dma-capture", &psc_dma->capture); |
538 | rc |= request_irq(psc_dma->playback.irq, | 467 | rc |= request_irq(psc_dma->playback.irq, &psc_dma_bcom_irq, IRQF_SHARED, |
539 | &psc_dma_bcom_irq_tx, IRQF_SHARED, | ||
540 | "psc-dma-playback", &psc_dma->playback); | 468 | "psc-dma-playback", &psc_dma->playback); |
541 | if (rc) { | 469 | if (rc) { |
542 | ret = -ENODEV; | 470 | ret = -ENODEV; |
diff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h index 8d396bb9d9fe..22208b373fb9 100644 --- a/sound/soc/fsl/mpc5200_dma.h +++ b/sound/soc/fsl/mpc5200_dma.h | |||
@@ -13,26 +13,25 @@ | |||
13 | * @psc_dma: pointer back to parent psc_dma data structure | 13 | * @psc_dma: pointer back to parent psc_dma data structure |
14 | * @bcom_task: bestcomm task structure | 14 | * @bcom_task: bestcomm task structure |
15 | * @irq: irq number for bestcomm task | 15 | * @irq: irq number for bestcomm task |
16 | * @period_start: physical address of start of DMA region | ||
17 | * @period_end: physical address of end of DMA region | 16 | * @period_end: physical address of end of DMA region |
18 | * @period_next_pt: physical address of next DMA buffer to enqueue | 17 | * @period_next_pt: physical address of next DMA buffer to enqueue |
19 | * @period_bytes: size of DMA period in bytes | 18 | * @period_bytes: size of DMA period in bytes |
19 | * @ac97_slot_bits: Enable bits for turning on the correct AC97 slot | ||
20 | */ | 20 | */ |
21 | struct psc_dma_stream { | 21 | struct psc_dma_stream { |
22 | struct snd_pcm_runtime *runtime; | 22 | struct snd_pcm_runtime *runtime; |
23 | snd_pcm_uframes_t appl_ptr; | ||
24 | |||
25 | int active; | 23 | int active; |
26 | struct psc_dma *psc_dma; | 24 | struct psc_dma *psc_dma; |
27 | struct bcom_task *bcom_task; | 25 | struct bcom_task *bcom_task; |
28 | int irq; | 26 | int irq; |
29 | struct snd_pcm_substream *stream; | 27 | struct snd_pcm_substream *stream; |
30 | dma_addr_t period_start; | 28 | int period_next; |
31 | dma_addr_t period_end; | 29 | int period_current; |
32 | dma_addr_t period_next_pt; | ||
33 | dma_addr_t period_current_pt; | ||
34 | int period_bytes; | 30 | int period_bytes; |
35 | int period_size; | 31 | int period_count; |
32 | |||
33 | /* AC97 state */ | ||
34 | u32 ac97_slot_bits; | ||
36 | }; | 35 | }; |
37 | 36 | ||
38 | /** | 37 | /** |
@@ -73,6 +72,15 @@ struct psc_dma { | |||
73 | } stats; | 72 | } stats; |
74 | }; | 73 | }; |
75 | 74 | ||
75 | /* Utility for retrieving psc_dma_stream structure from a substream */ | ||
76 | inline struct psc_dma_stream * | ||
77 | to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma) | ||
78 | { | ||
79 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) | ||
80 | return &psc_dma->capture; | ||
81 | return &psc_dma->playback; | ||
82 | } | ||
83 | |||
76 | int mpc5200_audio_dma_create(struct of_device *op); | 84 | int mpc5200_audio_dma_create(struct of_device *op); |
77 | int mpc5200_audio_dma_destroy(struct of_device *op); | 85 | int mpc5200_audio_dma_destroy(struct of_device *op); |
78 | 86 | ||
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index c4ae3e096bb9..3dbc7f7cd7b9 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c | |||
@@ -130,6 +130,7 @@ static int psc_ac97_hw_analog_params(struct snd_pcm_substream *substream, | |||
130 | struct snd_soc_dai *cpu_dai) | 130 | struct snd_soc_dai *cpu_dai) |
131 | { | 131 | { |
132 | struct psc_dma *psc_dma = cpu_dai->private_data; | 132 | struct psc_dma *psc_dma = cpu_dai->private_data; |
133 | struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); | ||
133 | 134 | ||
134 | dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i" | 135 | dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i" |
135 | " periods=%i buffer_size=%i buffer_bytes=%i channels=%i" | 136 | " periods=%i buffer_size=%i buffer_bytes=%i channels=%i" |
@@ -140,20 +141,10 @@ static int psc_ac97_hw_analog_params(struct snd_pcm_substream *substream, | |||
140 | params_channels(params), params_rate(params), | 141 | params_channels(params), params_rate(params), |
141 | params_format(params)); | 142 | params_format(params)); |
142 | 143 | ||
143 | 144 | /* Determine the set of enable bits to turn on */ | |
144 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) { | 145 | s->ac97_slot_bits = (params_channels(params) == 1) ? 0x100 : 0x300; |
145 | if (params_channels(params) == 1) | 146 | if (substream->pstr->stream != SNDRV_PCM_STREAM_CAPTURE) |
146 | psc_dma->slots |= 0x00000100; | 147 | s->ac97_slot_bits <<= 16; |
147 | else | ||
148 | psc_dma->slots |= 0x00000300; | ||
149 | } else { | ||
150 | if (params_channels(params) == 1) | ||
151 | psc_dma->slots |= 0x01000000; | ||
152 | else | ||
153 | psc_dma->slots |= 0x03000000; | ||
154 | } | ||
155 | out_be32(&psc_dma->psc_regs->ac97_slots, psc_dma->slots); | ||
156 | |||
157 | return 0; | 148 | return 0; |
158 | } | 149 | } |
159 | 150 | ||
@@ -163,6 +154,8 @@ static int psc_ac97_hw_digital_params(struct snd_pcm_substream *substream, | |||
163 | { | 154 | { |
164 | struct psc_dma *psc_dma = cpu_dai->private_data; | 155 | struct psc_dma *psc_dma = cpu_dai->private_data; |
165 | 156 | ||
157 | dev_dbg(psc_dma->dev, "%s(substream=%p)\n", __func__, substream); | ||
158 | |||
166 | if (params_channels(params) == 1) | 159 | if (params_channels(params) == 1) |
167 | out_be32(&psc_dma->psc_regs->ac97_slots, 0x01000000); | 160 | out_be32(&psc_dma->psc_regs->ac97_slots, 0x01000000); |
168 | else | 161 | else |
@@ -176,14 +169,24 @@ static int psc_ac97_trigger(struct snd_pcm_substream *substream, int cmd, | |||
176 | { | 169 | { |
177 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 170 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
178 | struct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data; | 171 | struct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data; |
172 | struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); | ||
179 | 173 | ||
180 | switch (cmd) { | 174 | switch (cmd) { |
175 | case SNDRV_PCM_TRIGGER_START: | ||
176 | dev_dbg(psc_dma->dev, "AC97 START: stream=%i\n", | ||
177 | substream->pstr->stream); | ||
178 | |||
179 | /* Set the slot enable bits */ | ||
180 | psc_dma->slots |= s->ac97_slot_bits; | ||
181 | out_be32(&psc_dma->psc_regs->ac97_slots, psc_dma->slots); | ||
182 | break; | ||
183 | |||
181 | case SNDRV_PCM_TRIGGER_STOP: | 184 | case SNDRV_PCM_TRIGGER_STOP: |
182 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) | 185 | dev_dbg(psc_dma->dev, "AC97 STOP: stream=%i\n", |
183 | psc_dma->slots &= 0xFFFF0000; | 186 | substream->pstr->stream); |
184 | else | ||
185 | psc_dma->slots &= 0x0000FFFF; | ||
186 | 187 | ||
188 | /* Clear the slot enable bits */ | ||
189 | psc_dma->slots &= ~(s->ac97_slot_bits); | ||
187 | out_be32(&psc_dma->psc_regs->ac97_slots, psc_dma->slots); | 190 | out_be32(&psc_dma->psc_regs->ac97_slots, psc_dma->slots); |
188 | break; | 191 | break; |
189 | } | 192 | } |
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index ef67d1cdffe7..83de1c81c8c4 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * express or implied. | 9 | * express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
14 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index b928ef7d28eb..6644cba7cbf2 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c | |||
@@ -55,7 +55,7 @@ static __init int pcm030_fabric_init(void) | |||
55 | struct platform_device *pdev; | 55 | struct platform_device *pdev; |
56 | int rc; | 56 | int rc; |
57 | 57 | ||
58 | if (!machine_is_compatible("phytec,pcm030")) | 58 | if (!of_machine_is_compatible("phytec,pcm030")) |
59 | return -ENODEV; | 59 | return -ENODEV; |
60 | 60 | ||
61 | card.platform = &mpc5200_audio_dma_platform; | 61 | card.platform = &mpc5200_audio_dma_platform; |
diff --git a/sound/soc/fsl/soc-of-simple.c b/sound/soc/fsl/soc-of-simple.c index 8bc5cd9e972f..3bc13fd89096 100644 --- a/sound/soc/fsl/soc-of-simple.c +++ b/sound/soc/fsl/soc-of-simple.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/of.h> | 14 | #include <linux/of.h> |
15 | #include <linux/slab.h> | ||
15 | #include <sound/core.h> | 16 | #include <sound/core.h> |
16 | #include <sound/pcm.h> | 17 | #include <sound/pcm.h> |
17 | #include <sound/pcm_params.h> | 18 | #include <sound/pcm_params.h> |