diff options
Diffstat (limited to 'sound/soc/imx/imx-pcm-fiq.c')
-rw-r--r-- | sound/soc/imx/imx-pcm-fiq.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/imx/imx-pcm-fiq.c b/sound/soc/imx/imx-pcm-fiq.c index 7945625e0e08..8df0fae21943 100644 --- a/sound/soc/imx/imx-pcm-fiq.c +++ b/sound/soc/imx/imx-pcm-fiq.c | |||
@@ -240,25 +240,23 @@ static int ssi_irq = 0; | |||
240 | 240 | ||
241 | static int imx_pcm_fiq_new(struct snd_soc_pcm_runtime *rtd) | 241 | static int imx_pcm_fiq_new(struct snd_soc_pcm_runtime *rtd) |
242 | { | 242 | { |
243 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
244 | struct snd_pcm *pcm = rtd->pcm; | 243 | struct snd_pcm *pcm = rtd->pcm; |
244 | struct snd_pcm_substream *substream; | ||
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | ret = imx_pcm_new(rtd); | 247 | ret = imx_pcm_new(rtd); |
248 | if (ret) | 248 | if (ret) |
249 | return ret; | 249 | return ret; |
250 | 250 | ||
251 | if (dai->driver->playback.channels_min) { | 251 | substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; |
252 | struct snd_pcm_substream *substream = | 252 | if (substream) { |
253 | pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; | ||
254 | struct snd_dma_buffer *buf = &substream->dma_buffer; | 253 | struct snd_dma_buffer *buf = &substream->dma_buffer; |
255 | 254 | ||
256 | imx_ssi_fiq_tx_buffer = (unsigned long)buf->area; | 255 | imx_ssi_fiq_tx_buffer = (unsigned long)buf->area; |
257 | } | 256 | } |
258 | 257 | ||
259 | if (dai->driver->capture.channels_min) { | 258 | substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; |
260 | struct snd_pcm_substream *substream = | 259 | if (substream) { |
261 | pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; | ||
262 | struct snd_dma_buffer *buf = &substream->dma_buffer; | 260 | struct snd_dma_buffer *buf = &substream->dma_buffer; |
263 | 261 | ||
264 | imx_ssi_fiq_rx_buffer = (unsigned long)buf->area; | 262 | imx_ssi_fiq_rx_buffer = (unsigned long)buf->area; |