Commit 08201deb authored by Daniel Mack's avatar Daniel Mack Committed by Mark Brown

ASoC: ak4104: handle more sample rates

Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ddffeb8c
...@@ -98,14 +98,32 @@ static int ak4104_hw_params(struct snd_pcm_substream *substream, ...@@ -98,14 +98,32 @@ static int ak4104_hw_params(struct snd_pcm_substream *substream,
val = 0; val = 0;
switch (params_rate(params)) { switch (params_rate(params)) {
case 22050:
val |= IEC958_AES3_CON_FS_22050;
break;
case 24000:
val |= IEC958_AES3_CON_FS_24000;
break;
case 32000:
val |= IEC958_AES3_CON_FS_32000;
break;
case 44100: case 44100:
val |= IEC958_AES3_CON_FS_44100; val |= IEC958_AES3_CON_FS_44100;
break; break;
case 48000: case 48000:
val |= IEC958_AES3_CON_FS_48000; val |= IEC958_AES3_CON_FS_48000;
break; break;
case 32000: case 88200:
val |= IEC958_AES3_CON_FS_32000; val |= IEC958_AES3_CON_FS_88200;
break;
case 96000:
val |= IEC958_AES3_CON_FS_96000;
break;
case 176400:
val |= IEC958_AES3_CON_FS_176400;
break;
case 192000:
val |= IEC958_AES3_CON_FS_192000;
break; break;
default: default:
dev_err(codec->dev, "unsupported sampling rate\n"); dev_err(codec->dev, "unsupported sampling rate\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment