diff options
Diffstat (limited to 'sound/soc/intel/sst-haswell-pcm.c')
-rw-r--r-- | sound/soc/intel/sst-haswell-pcm.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c index 058efb17c568..61bf6da4bb02 100644 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c | |||
@@ -80,7 +80,7 @@ static const struct snd_pcm_hardware hsw_pcm_hardware = { | |||
80 | SNDRV_PCM_INFO_PAUSE | | 80 | SNDRV_PCM_INFO_PAUSE | |
81 | SNDRV_PCM_INFO_RESUME | | 81 | SNDRV_PCM_INFO_RESUME | |
82 | SNDRV_PCM_INFO_NO_PERIOD_WAKEUP, | 82 | SNDRV_PCM_INFO_NO_PERIOD_WAKEUP, |
83 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE | | 83 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | |
84 | SNDRV_PCM_FMTBIT_S32_LE, | 84 | SNDRV_PCM_FMTBIT_S32_LE, |
85 | .period_bytes_min = PAGE_SIZE, | 85 | .period_bytes_min = PAGE_SIZE, |
86 | .period_bytes_max = (HSW_PCM_PERIODS_MAX / HSW_PCM_PERIODS_MIN) * PAGE_SIZE, | 86 | .period_bytes_max = (HSW_PCM_PERIODS_MAX / HSW_PCM_PERIODS_MIN) * PAGE_SIZE, |
@@ -400,7 +400,15 @@ static int hsw_pcm_hw_params(struct snd_pcm_substream *substream, | |||
400 | sst_hsw_stream_set_valid(hsw, pcm_data->stream, 16); | 400 | sst_hsw_stream_set_valid(hsw, pcm_data->stream, 16); |
401 | break; | 401 | break; |
402 | case SNDRV_PCM_FORMAT_S24_LE: | 402 | case SNDRV_PCM_FORMAT_S24_LE: |
403 | bits = SST_HSW_DEPTH_24BIT; | 403 | bits = SST_HSW_DEPTH_32BIT; |
404 | sst_hsw_stream_set_valid(hsw, pcm_data->stream, 24); | ||
405 | break; | ||
406 | case SNDRV_PCM_FORMAT_S8: | ||
407 | bits = SST_HSW_DEPTH_8BIT; | ||
408 | sst_hsw_stream_set_valid(hsw, pcm_data->stream, 8); | ||
409 | break; | ||
410 | case SNDRV_PCM_FORMAT_S32_LE: | ||
411 | bits = SST_HSW_DEPTH_32BIT; | ||
404 | sst_hsw_stream_set_valid(hsw, pcm_data->stream, 32); | 412 | sst_hsw_stream_set_valid(hsw, pcm_data->stream, 32); |
405 | break; | 413 | break; |
406 | default: | 414 | default: |
@@ -685,8 +693,9 @@ static int hsw_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
685 | } | 693 | } |
686 | 694 | ||
687 | #define HSW_FORMATS \ | 695 | #define HSW_FORMATS \ |
688 | (SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S16_LE |\ | 696 | (SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S24_LE | \ |
689 | SNDRV_PCM_FMTBIT_S32_LE) | 697 | SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S16_LE |\ |
698 | SNDRV_PCM_FMTBIT_S8) | ||
690 | 699 | ||
691 | static struct snd_soc_dai_driver hsw_dais[] = { | 700 | static struct snd_soc_dai_driver hsw_dais[] = { |
692 | { | 701 | { |
@@ -696,7 +705,7 @@ static struct snd_soc_dai_driver hsw_dais[] = { | |||
696 | .channels_min = 2, | 705 | .channels_min = 2, |
697 | .channels_max = 2, | 706 | .channels_max = 2, |
698 | .rates = SNDRV_PCM_RATE_48000, | 707 | .rates = SNDRV_PCM_RATE_48000, |
699 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 708 | .formats = SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE, |
700 | }, | 709 | }, |
701 | }, | 710 | }, |
702 | { | 711 | { |
@@ -727,8 +736,8 @@ static struct snd_soc_dai_driver hsw_dais[] = { | |||
727 | .stream_name = "Loopback Capture", | 736 | .stream_name = "Loopback Capture", |
728 | .channels_min = 2, | 737 | .channels_min = 2, |
729 | .channels_max = 2, | 738 | .channels_max = 2, |
730 | .rates = SNDRV_PCM_RATE_8000_192000, | 739 | .rates = SNDRV_PCM_RATE_48000, |
731 | .formats = HSW_FORMATS, | 740 | .formats = SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE, |
732 | }, | 741 | }, |
733 | }, | 742 | }, |
734 | { | 743 | { |
@@ -737,8 +746,8 @@ static struct snd_soc_dai_driver hsw_dais[] = { | |||
737 | .stream_name = "Analog Capture", | 746 | .stream_name = "Analog Capture", |
738 | .channels_min = 2, | 747 | .channels_min = 2, |
739 | .channels_max = 2, | 748 | .channels_max = 2, |
740 | .rates = SNDRV_PCM_RATE_8000_192000, | 749 | .rates = SNDRV_PCM_RATE_48000, |
741 | .formats = HSW_FORMATS, | 750 | .formats = SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE, |
742 | }, | 751 | }, |
743 | }, | 752 | }, |
744 | }; | 753 | }; |