Skip to contentSkip to conversation

ASoC machine driver: how to configure supported frame rates?

DISCUSSION Sergej Sawazki 2 participants 3 messages Oct 10, 2014

lore
Share & tools
lore
#0 lore raw

Dear all,

I'm writing an ALSA SoC machine driver. The codec on my board, as well as the cpu do support the following rates: SNDRV_PCM_RATE_8000_192000

However, the codec, as well as the cpu are clock slaves and the clocks are fixed. Hence, my board does only support the 96kHz sample rate.

Can someone give me some advice on how to tell ALSA that my board does only support the rate SNDRV_PCM_RATE_96000?
I don't want to modify the codec and the platform driver.

Any help would be highly appreciated. Thanks!

- Sergej

#1 lore raw
Quoted 5 lines · Sergej Sawazki

Dear all,

I'm writing an ALSA SoC machine driver. The codec on my board, as well as the cpu do support the following rates: SNDRV_PCM_RATE_8000_192000

Quoted 8 lines

However, the codec, as well as the cpu are clock slaves and the clocks are fixed. Hence, my board does only support the 96kHz sample rate.

Can someone give me some advice on how to tell ALSA that my board does only support the rate SNDRV_PCM_RATE_96000?
I don't want to modify the codec and the platform driver.

Any help would be highly appreciated. Thanks!

You can apply additional constraints in the startup callback of the snd_soc_ops of DAI link in your board driver.

For example see sound/soc/samsung/h1940_uda1380.c

- Lars

#2 lore raw

Am 10.10.2014 um 20:29 schrieb Lars-Peter Clausen:

Quoted 13 lines · Sergej Sawazki
Quoted 12 lines

Dear all,

I'm writing an ALSA SoC machine driver. The codec on my board, as well as the cpu do support the following rates: SNDRV_PCM_RATE_8000_192000

However, the codec, as well as the cpu are clock slaves and the clocks are fixed. Hence, my board does only support the 96kHz sample rate.

Can someone give me some advice on how to tell ALSA that my board does only support the rate SNDRV_PCM_RATE_96000?
I don't want to modify the codec and the platform driver.

Quoted 9 lines
Quoted 1 line

Any help would be highly appreciated. Thanks!

You can apply additional constraints in the startup callback of the snd_soc_ops of DAI link in your board driver.

For example see sound/soc/samsung/h1940_uda1380.c

- Lars

Lars, thanks for you help. It is working.

- Sergej