aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-mcasp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 8566238db2a5..7173df254a91 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -732,16 +732,19 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
732 davinci_hw_param(dev, substream->stream); 732 davinci_hw_param(dev, substream->stream);
733 733
734 switch (params_format(params)) { 734 switch (params_format(params)) {
735 case SNDRV_PCM_FORMAT_U8:
735 case SNDRV_PCM_FORMAT_S8: 736 case SNDRV_PCM_FORMAT_S8:
736 dma_params->data_type = 1; 737 dma_params->data_type = 1;
737 word_length = DAVINCI_AUDIO_WORD_8; 738 word_length = DAVINCI_AUDIO_WORD_8;
738 break; 739 break;
739 740
741 case SNDRV_PCM_FORMAT_U16_LE:
740 case SNDRV_PCM_FORMAT_S16_LE: 742 case SNDRV_PCM_FORMAT_S16_LE:
741 dma_params->data_type = 2; 743 dma_params->data_type = 2;
742 word_length = DAVINCI_AUDIO_WORD_16; 744 word_length = DAVINCI_AUDIO_WORD_16;
743 break; 745 break;
744 746
747 case SNDRV_PCM_FORMAT_U32_LE:
745 case SNDRV_PCM_FORMAT_S32_LE: 748 case SNDRV_PCM_FORMAT_S32_LE:
746 dma_params->data_type = 4; 749 dma_params->data_type = 4;
747 word_length = DAVINCI_AUDIO_WORD_32; 750 word_length = DAVINCI_AUDIO_WORD_32;
@@ -818,6 +821,13 @@ static struct snd_soc_dai_ops davinci_mcasp_dai_ops = {
818 821
819}; 822};
820 823
824#define DAVINCI_MCASP_PCM_FMTS (SNDRV_PCM_FMTBIT_S8 | \
825 SNDRV_PCM_FMTBIT_U8 | \
826 SNDRV_PCM_FMTBIT_S16_LE | \
827 SNDRV_PCM_FMTBIT_U16_LE | \
828 SNDRV_PCM_FMTBIT_S32_LE | \
829 SNDRV_PCM_FMTBIT_U32_LE)
830
821static struct snd_soc_dai_driver davinci_mcasp_dai[] = { 831static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
822 { 832 {
823 .name = "davinci-mcasp.0", 833 .name = "davinci-mcasp.0",
@@ -825,17 +835,13 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
825 .channels_min = 2, 835 .channels_min = 2,
826 .channels_max = 2, 836 .channels_max = 2,
827 .rates = DAVINCI_MCASP_RATES, 837 .rates = DAVINCI_MCASP_RATES,
828 .formats = SNDRV_PCM_FMTBIT_S8 | 838 .formats = DAVINCI_MCASP_PCM_FMTS,
829 SNDRV_PCM_FMTBIT_S16_LE |
830 SNDRV_PCM_FMTBIT_S32_LE,
831 }, 839 },
832 .capture = { 840 .capture = {
833 .channels_min = 2, 841 .channels_min = 2,
834 .channels_max = 2, 842 .channels_max = 2,
835 .rates = DAVINCI_MCASP_RATES, 843 .rates = DAVINCI_MCASP_RATES,
836 .formats = SNDRV_PCM_FMTBIT_S8 | 844 .formats = DAVINCI_MCASP_PCM_FMTS,
837 SNDRV_PCM_FMTBIT_S16_LE |
838 SNDRV_PCM_FMTBIT_S32_LE,
839 }, 845 },
840 .ops = &davinci_mcasp_dai_ops, 846 .ops = &davinci_mcasp_dai_ops,
841 847
@@ -846,7 +852,7 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
846 .channels_min = 1, 852 .channels_min = 1,
847 .channels_max = 384, 853 .channels_max = 384,
848 .rates = DAVINCI_MCASP_RATES, 854 .rates = DAVINCI_MCASP_RATES,
849 .formats = SNDRV_PCM_FMTBIT_S16_LE, 855 .formats = DAVINCI_MCASP_PCM_FMTS,
850 }, 856 },
851 .ops = &davinci_mcasp_dai_ops, 857 .ops = &davinci_mcasp_dai_ops,
852 }, 858 },