Message ID | 20190327064236.144843-1-tzungbi@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: mt8183: change supported formats of DL2 and UL1 | expand |
On Wed, 2019-03-27 at 14:42 +0800, Tzung-Bi Shih wrote: > DL2 and UL1 should only provide 16-bit, mono, 8kHz and 16kHz to > userspace. Change the formats accordingly. > > Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Hi, i thought we should report hardware capabilities, not user space's intention?
Hi, I see. This is common code for all 8183 platform and indeed a wrong place to confine the formats. Please ignore this patch. On Thu, Mar 28, 2019 at 8:28 AM KaiChieh Chuang < kaichieh.chuang@mediatek.com> wrote: > On Wed, 2019-03-27 at 14:42 +0800, Tzung-Bi Shih wrote: > > DL2 and UL1 should only provide 16-bit, mono, 8kHz and 16kHz to > > userspace. Change the formats accordingly. > > > > Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> > > Hi, > i thought we should report hardware capabilities, not user space's > intention? > >
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c index 43be51bf0329..ad42da1b948c 100644 --- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c @@ -195,9 +195,9 @@ static struct snd_soc_dai_driver mt8183_memif_dai_driver[] = { .playback = { .stream_name = "DL2", .channels_min = 1, - .channels_max = 2, - .rates = MTK_PCM_RATES, - .formats = MTK_PCM_FORMATS, + .channels_max = 1, + .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .ops = &mtk_afe_fe_ops, }, @@ -219,9 +219,9 @@ static struct snd_soc_dai_driver mt8183_memif_dai_driver[] = { .capture = { .stream_name = "UL1", .channels_min = 1, - .channels_max = 2, - .rates = MTK_PCM_RATES, - .formats = MTK_PCM_FORMATS, + .channels_max = 1, + .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .ops = &mtk_afe_fe_ops, },
DL2 and UL1 should only provide 16-bit, mono, 8kHz and 16kHz to userspace. Change the formats accordingly. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> --- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)