summaryrefslogtreecommitdiff
path: root/sound/soc/starfive/starfive_pwmdac.c
diff options
context:
space:
mode:
authorminda.chen <minda.chen@starfivetech.com>2022-07-13 09:04:54 +0300
committerminda.chen <minda.chen@starfivetech.com>2022-07-21 16:29:05 +0300
commitae6c3943ef0c35b257eeae0a3b83f065b79ba241 (patch)
treeec54b6ad4ca5db5223fa6f1ef678c28b3ef8cbeb /sound/soc/starfive/starfive_pwmdac.c
parent274461d91cf3d04272a72de1f61ac9df4b42315c (diff)
downloadlinux-ae6c3943ef0c35b257eeae0a3b83f065b79ba241.tar.xz
pwmdac:sound: support 11025hz play mode.
1. set the correct clock rate and sample cnt. 2. using aplay 11.025kz wave file can pass. 3. fix issue redmine 1584 Signed-off-by: minda.chen <minda.chen@starfivetech.com>
Diffstat (limited to 'sound/soc/starfive/starfive_pwmdac.c')
-rwxr-xr-xsound/soc/starfive/starfive_pwmdac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/starfive/starfive_pwmdac.c b/sound/soc/starfive/starfive_pwmdac.c
index e5ecb8f296d2..f4980c48b886 100755
--- a/sound/soc/starfive/starfive_pwmdac.c
+++ b/sound/soc/starfive/starfive_pwmdac.c
@@ -573,6 +573,10 @@ static int sf_pwmdac_hw_params(struct snd_pcm_substream *substream,
dev->datan = PWMDAC_SAMPLE_CNT_3;
mclk_dac_value = 6144000;
break;
+ case 11025:
+ dev->datan = PWMDAC_SAMPLE_CNT_2;
+ mclk_dac_value = 5644800;
+ break;
case 16000:
dev->datan = PWMDAC_SAMPLE_CNT_3;
mclk_dac_value = 12288000;