Skip to content

Commit b9da500

Browse files
fengchunguobroonie
authored andcommitted
ASoC: max98373: add 88200 and 96000 sampling rate support
88200 and 96000 sampling rate was not enabled on driver, so can't be played. The error information: max98373 3-0031:rate 96000 not supported max98373 3-0031:ASoC: can't set max98373-aif1 hw params: -22 Signed-off-by: fengchunguo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 52f87f3 commit b9da500

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sound/soc/codecs/max98373.c

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,12 @@ static int max98373_dai_hw_params(struct snd_pcm_substream *substream,
267267
case 48000:
268268
sampling_rate = MAX98373_PCM_SR_SET1_SR_48000;
269269
break;
270+
case 88200:
271+
sampling_rate = MAX98373_PCM_SR_SET1_SR_88200;
272+
break;
273+
case 96000:
274+
sampling_rate = MAX98373_PCM_SR_SET1_SR_96000;
275+
break;
270276
default:
271277
dev_err(component->dev, "rate %d not supported\n",
272278
params_rate(params));

sound/soc/codecs/max98373.h

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
#define MAX98373_PCM_SR_SET1_SR_32000 (0x6 << 0)
131131
#define MAX98373_PCM_SR_SET1_SR_44100 (0x7 << 0)
132132
#define MAX98373_PCM_SR_SET1_SR_48000 (0x8 << 0)
133+
#define MAX98373_PCM_SR_SET1_SR_88200 (0x9 << 0)
134+
#define MAX98373_PCM_SR_SET1_SR_96000 (0xA << 0)
133135

134136
/* MAX98373_R2028_PCM_SR_SETUP_2 */
135137
#define MAX98373_PCM_SR_SET2_SR_MASK (0xF << 4)

0 commit comments

Comments
 (0)