···847847848848/* SoC machine DAI configuration, glues a codec and cpu DAI together */849849struct snd_soc_pcm_runtime {850850- struct device dev;850850+ struct device *dev;851851 struct snd_soc_card *card;852852 struct snd_soc_dai_link *dai_link;853853 struct mutex pcm_mutex;···933933static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd,934934 void *data)935935{936936- dev_set_drvdata(&rtd->dev, data);936936+ dev_set_drvdata(rtd->dev, data);937937}938938939939static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd)940940{941941- return dev_get_drvdata(&rtd->dev);941941+ return dev_get_drvdata(rtd->dev);942942}943943944944static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
+1-1
sound/soc/atmel/Kconfig
···26262727config SND_AT91_SOC_AFEB92602828 tristate "SoC Audio support for AFEB9260 board"2929- depends on ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC2929+ depends on ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC3030 select SND_ATMEL_SOC_SSC3131 select SND_SOC_TLV320AIC233232 help
+2-3
sound/soc/atmel/atmel-pcm.c
···367367static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd)368368{369369 struct snd_card *card = rtd->card->snd_card;370370- struct snd_soc_dai *dai = rtd->cpu_dai;371370 struct snd_pcm *pcm = rtd->pcm;372371 int ret = 0;373372···375376 if (!card->dev->coherent_dma_mask)376377 card->dev->coherent_dma_mask = 0xffffffff;377378378378- if (dai->driver->playback.channels_min) {379379+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {379380 ret = atmel_pcm_preallocate_dma_buffer(pcm,380381 SNDRV_PCM_STREAM_PLAYBACK);381382 if (ret)382383 goto out;383384 }384385385385- if (dai->driver->capture.channels_min) {386386+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {386387 pr_debug("atmel-pcm:"387388 "Allocating PCM capture DMA buffer\n");388389 ret = atmel_pcm_preallocate_dma_buffer(pcm,
+2-3
sound/soc/blackfin/bf5xx-ac97-pcm.c
···421421static int bf5xx_pcm_ac97_new(struct snd_soc_pcm_runtime *rtd)422422{423423 struct snd_card *card = rtd->card->snd_card;424424- struct snd_soc_dai *dai = rtd->cpu_dai;425424 struct snd_pcm *pcm = rtd->pcm;426425 int ret = 0;427426···430431 if (!card->dev->coherent_dma_mask)431432 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);432433433433- if (dai->driver->playback.channels_min) {434434+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {434435 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,435436 SNDRV_PCM_STREAM_PLAYBACK);436437 if (ret)437438 goto out;438439 }439440440440- if (dai->driver->capture.channels_min) {441441+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {441442 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,442443 SNDRV_PCM_STREAM_CAPTURE);443444 if (ret)
+2-3
sound/soc/blackfin/bf5xx-i2s-pcm.c
···260260static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd)261261{262262 struct snd_card *card = rtd->card->snd_card;263263- struct snd_soc_dai *dai = rtd->cpu_dai;264263 struct snd_pcm *pcm = rtd->pcm;265264 int ret = 0;266265···269270 if (!card->dev->coherent_dma_mask)270271 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);271272272272- if (dai->driver->playback.channels_min) {273273+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {273274 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,274275 SNDRV_PCM_STREAM_PLAYBACK);275276 if (ret)276277 goto out;277278 }278279279279- if (dai->driver->capture.channels_min) {280280+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {280281 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,281282 SNDRV_PCM_STREAM_CAPTURE);282283 if (ret)
+2-3
sound/soc/blackfin/bf5xx-tdm-pcm.c
···286286static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd)287287{288288 struct snd_card *card = rtd->card->snd_card;289289- struct snd_soc_dai *dai = rtd->cpu_dai;290289 struct snd_pcm *pcm = rtd->pcm;291290 int ret = 0;292291···294295 if (!card->dev->coherent_dma_mask)295296 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);296297297297- if (dai->driver->playback.channels_min) {298298+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {298299 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,299300 SNDRV_PCM_STREAM_PLAYBACK);300301 if (ret)301302 goto out;302303 }303304304304- if (dai->driver->capture.channels_min) {305305+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {305306 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,306307 SNDRV_PCM_STREAM_CAPTURE);307308 if (ret)
+2-3
sound/soc/davinci/davinci-pcm.c
···831831static int davinci_pcm_new(struct snd_soc_pcm_runtime *rtd)832832{833833 struct snd_card *card = rtd->card->snd_card;834834- struct snd_soc_dai *dai = rtd->cpu_dai;835834 struct snd_pcm *pcm = rtd->pcm;836835 int ret;837836···839840 if (!card->dev->coherent_dma_mask)840841 card->dev->coherent_dma_mask = 0xffffffff;841842842842- if (dai->driver->playback.channels_min) {843843+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {843844 ret = davinci_pcm_preallocate_dma_buffer(pcm,844845 SNDRV_PCM_STREAM_PLAYBACK,845846 pcm_hardware_playback.buffer_bytes_max);···847848 return ret;848849 }849850850850- if (dai->driver->capture.channels_min) {851851+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {851852 ret = davinci_pcm_preallocate_dma_buffer(pcm,852853 SNDRV_PCM_STREAM_CAPTURE,853854 pcm_hardware_capture.buffer_bytes_max);
+2-3
sound/soc/ep93xx/ep93xx-pcm.c
···286286static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd)287287{288288 struct snd_card *card = rtd->card->snd_card;289289- struct snd_soc_dai *dai = rtd->cpu_dai;290289 struct snd_pcm *pcm = rtd->pcm;291290 int ret = 0;292291···294295 if (!card->dev->coherent_dma_mask)295296 card->dev->coherent_dma_mask = 0xffffffff;296297297297- if (dai->driver->playback.channels_min) {298298+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {298299 ret = ep93xx_pcm_preallocate_dma_buffer(pcm,299300 SNDRV_PCM_STREAM_PLAYBACK);300301 if (ret)301302 return ret;302303 }303304304304- if (dai->driver->capture.channels_min) {305305+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {305306 ret = ep93xx_pcm_preallocate_dma_buffer(pcm,306307 SNDRV_PCM_STREAM_CAPTURE);307308 if (ret)
+2-3
sound/soc/jz4740/jz4740-pcm.c
···302302static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd)303303{304304 struct snd_card *card = rtd->card->snd_card;305305- struct snd_soc_dai *dai = rtd->cpu_dai;306305 struct snd_pcm *pcm = rtd->pcm;307306 int ret = 0;308307···311312 if (!card->dev->coherent_dma_mask)312313 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);313314314314- if (dai->driver->playback.channels_min) {315315+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {315316 ret = jz4740_pcm_preallocate_dma_buffer(pcm,316317 SNDRV_PCM_STREAM_PLAYBACK);317318 if (ret)318319 goto err;319320 }320321321321- if (dai->driver->capture.channels_min) {322322+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {322323 ret = jz4740_pcm_preallocate_dma_buffer(pcm,323324 SNDRV_PCM_STREAM_CAPTURE);324325 if (ret)
+2-3
sound/soc/kirkwood/kirkwood-dma.c
···315315static int kirkwood_dma_new(struct snd_soc_pcm_runtime *rtd)316316{317317 struct snd_card *card = rtd->card->snd_card;318318- struct snd_soc_dai *dai = rtd->cpu_dai;319318 struct snd_pcm *pcm = rtd->pcm;320319 int ret;321320···323324 if (!card->dev->coherent_dma_mask)324325 card->dev->coherent_dma_mask = 0xffffffff;325326326326- if (dai->driver->playback.channels_min) {327327+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {327328 ret = kirkwood_dma_preallocate_dma_buffer(pcm,328329 SNDRV_PCM_STREAM_PLAYBACK);329330 if (ret)330331 return ret;331332 }332333333333- if (dai->driver->capture.channels_min) {334334+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {334335 ret = kirkwood_dma_preallocate_dma_buffer(pcm,335336 SNDRV_PCM_STREAM_CAPTURE);336337 if (ret)
+2-3
sound/soc/mid-x86/sst_platform.c
···446446447447static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)448448{449449- struct snd_soc_dai *dai = rtd->cpu_dai;450449 struct snd_pcm *pcm = rtd->pcm;451450 int retval = 0;452451453452 pr_debug("sst_pcm_new called\n");454454- if (dai->driver->playback.channels_min ||455455- dai->driver->capture.channels_min) {453453+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream ||454454+ pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {456455 retval = snd_pcm_lib_preallocate_pages_for_all(pcm,457456 SNDRV_DMA_TYPE_CONTINUOUS,458457 snd_dma_continuous_data(GFP_KERNEL),
+2-3
sound/soc/omap/omap-pcm.c
···378378static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd)379379{380380 struct snd_card *card = rtd->card->snd_card;381381- struct snd_soc_dai *dai = rtd->cpu_dai;382381 struct snd_pcm *pcm = rtd->pcm;383382 int ret = 0;384383···386387 if (!card->dev->coherent_dma_mask)387388 card->dev->coherent_dma_mask = DMA_BIT_MASK(64);388389389389- if (dai->driver->playback.channels_min) {390390+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {390391 ret = omap_pcm_preallocate_dma_buffer(pcm,391392 SNDRV_PCM_STREAM_PLAYBACK);392393 if (ret)393394 goto out;394395 }395396396396- if (dai->driver->capture.channels_min) {397397+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {397398 ret = omap_pcm_preallocate_dma_buffer(pcm,398399 SNDRV_PCM_STREAM_CAPTURE);399400 if (ret)
+2-3
sound/soc/samsung/dma.c
···403403static int dma_new(struct snd_soc_pcm_runtime *rtd)404404{405405 struct snd_card *card = rtd->card->snd_card;406406- struct snd_soc_dai *dai = rtd->cpu_dai;407406 struct snd_pcm *pcm = rtd->pcm;408407 int ret = 0;409408···413414 if (!card->dev->coherent_dma_mask)414415 card->dev->coherent_dma_mask = 0xffffffff;415416416416- if (dai->driver->playback.channels_min) {417417+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {417418 ret = preallocate_dma_buffer(pcm,418419 SNDRV_PCM_STREAM_PLAYBACK);419420 if (ret)420421 goto out;421422 }422423423423- if (dai->driver->capture.channels_min) {424424+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {424425 ret = preallocate_dma_buffer(pcm,425426 SNDRV_PCM_STREAM_CAPTURE);426427 if (ret)
+2-2
sound/soc/samsung/idma.c
···387387static int idma_new(struct snd_soc_pcm_runtime *rtd)388388{389389 struct snd_card *card = rtd->card->snd_card;390390- struct snd_soc_dai *dai = rtd->cpu_dai;391390 struct snd_pcm *pcm = rtd->pcm;392391 int ret = 0;393392···395396 if (!card->dev->coherent_dma_mask)396397 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);397398398398- if (dai->driver->playback.channels_min)399399+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {399400 ret = preallocate_idma_buffer(pcm,400401 SNDRV_PCM_STREAM_PLAYBACK);402402+ }401403402404 return ret;403405}
···330330static int tegra_pcm_new(struct snd_soc_pcm_runtime *rtd)331331{332332 struct snd_card *card = rtd->card->snd_card;333333- struct snd_soc_dai *dai = rtd->cpu_dai;334333 struct snd_pcm *pcm = rtd->pcm;335334 int ret = 0;336335···338339 if (!card->dev->coherent_dma_mask)339340 card->dev->coherent_dma_mask = 0xffffffff;340341341341- if (dai->driver->playback.channels_min) {342342+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {342343 ret = tegra_pcm_preallocate_dma_buffer(pcm,343344 SNDRV_PCM_STREAM_PLAYBACK);344345 if (ret)345346 goto err;346347 }347348348348- if (dai->driver->capture.channels_min) {349349+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {349350 ret = tegra_pcm_preallocate_dma_buffer(pcm,350351 SNDRV_PCM_STREAM_CAPTURE);351352 if (ret)