diff options
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 5d1f98a4c978..0a302e1080d9 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -714,16 +714,13 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream, | |||
714 | struct davinci_pcm_dma_params *dma_params = | 714 | struct davinci_pcm_dma_params *dma_params = |
715 | &dev->dma_params[substream->stream]; | 715 | &dev->dma_params[substream->stream]; |
716 | int word_length; | 716 | int word_length; |
717 | u8 numevt; | 717 | u8 fifo_level; |
718 | 718 | ||
719 | davinci_hw_common_param(dev, substream->stream); | 719 | davinci_hw_common_param(dev, substream->stream); |
720 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 720 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
721 | numevt = dev->txnumevt; | 721 | fifo_level = dev->txnumevt; |
722 | else | 722 | else |
723 | numevt = dev->rxnumevt; | 723 | fifo_level = dev->rxnumevt; |
724 | |||
725 | if (!numevt) | ||
726 | numevt = 1; | ||
727 | 724 | ||
728 | if (dev->op_mode == DAVINCI_MCASP_DIT_MODE) | 725 | if (dev->op_mode == DAVINCI_MCASP_DIT_MODE) |
729 | davinci_hw_dit_param(dev); | 726 | davinci_hw_dit_param(dev); |
@@ -751,12 +748,12 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream, | |||
751 | return -EINVAL; | 748 | return -EINVAL; |
752 | } | 749 | } |
753 | 750 | ||
754 | if (dev->version == MCASP_VERSION_2) { | 751 | if (dev->version == MCASP_VERSION_2 && !fifo_level) |
755 | dma_params->data_type *= numevt; | 752 | dma_params->acnt = 4; |
756 | dma_params->acnt = 4 * numevt; | 753 | else |
757 | } else | ||
758 | dma_params->acnt = dma_params->data_type; | 754 | dma_params->acnt = dma_params->data_type; |
759 | 755 | ||
756 | dma_params->fifo_level = fifo_level; | ||
760 | davinci_config_channel_size(dev, word_length); | 757 | davinci_config_channel_size(dev, word_length); |
761 | 758 | ||
762 | return 0; | 759 | return 0; |
@@ -907,6 +904,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
907 | 904 | ||
908 | dma_data->channel = res->start; | 905 | dma_data->channel = res->start; |
909 | davinci_mcasp_dai[pdata->op_mode].private_data = dev; | 906 | davinci_mcasp_dai[pdata->op_mode].private_data = dev; |
907 | davinci_mcasp_dai[pdata->op_mode].dma_data = dev->dma_params; | ||
910 | davinci_mcasp_dai[pdata->op_mode].dev = &pdev->dev; | 908 | davinci_mcasp_dai[pdata->op_mode].dev = &pdev->dev; |
911 | ret = snd_soc_register_dai(&davinci_mcasp_dai[pdata->op_mode]); | 909 | ret = snd_soc_register_dai(&davinci_mcasp_dai[pdata->op_mode]); |
912 | 910 | ||