Merge remote-tracking branch 'asoc/fix/spear' into asoc-next
This commit is contained in:
commit
40bac28eb1
|
@ -149,9 +149,9 @@ static void spear_pcm_free(struct snd_pcm *pcm)
|
||||||
|
|
||||||
static u64 spear_pcm_dmamask = DMA_BIT_MASK(32);
|
static u64 spear_pcm_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static int spear_pcm_new(struct snd_card *card,
|
static int spear_pcm_new(struct snd_soc_pcm_runtime *rtd)
|
||||||
struct snd_soc_dai *dai, struct snd_pcm *pcm)
|
|
||||||
{
|
{
|
||||||
|
struct snd_card *card = rtd->card->snd_card;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!card->dev->dma_mask)
|
if (!card->dev->dma_mask)
|
||||||
|
@ -159,16 +159,16 @@ static int spear_pcm_new(struct snd_card *card,
|
||||||
if (!card->dev->coherent_dma_mask)
|
if (!card->dev->coherent_dma_mask)
|
||||||
card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
|
card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
if (dai->driver->playback.channels_min) {
|
if (rtd->cpu_dai->driver->playback.channels_min) {
|
||||||
ret = spear_pcm_preallocate_dma_buffer(pcm,
|
ret = spear_pcm_preallocate_dma_buffer(rtd->pcm,
|
||||||
SNDRV_PCM_STREAM_PLAYBACK,
|
SNDRV_PCM_STREAM_PLAYBACK,
|
||||||
spear_pcm_hardware.buffer_bytes_max);
|
spear_pcm_hardware.buffer_bytes_max);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dai->driver->capture.channels_min) {
|
if (rtd->cpu_dai->driver->capture.channels_min) {
|
||||||
ret = spear_pcm_preallocate_dma_buffer(pcm,
|
ret = spear_pcm_preallocate_dma_buffer(rtd->pcm,
|
||||||
SNDRV_PCM_STREAM_CAPTURE,
|
SNDRV_PCM_STREAM_CAPTURE,
|
||||||
spear_pcm_hardware.buffer_bytes_max);
|
spear_pcm_hardware.buffer_bytes_max);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Reference in a new issue