How to handle stream rates if CPU supports many channels ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ALSA ML

I want to ask you about struct snd_soc_pcm_stream::rates which
indicates available sampling rates (= SNDRV_PCM_RATE_xxxx).

Basic use case of my CPU driver is 2ch output,
but, it can handle 6ch, 8ch, 16ch sounds.
And it can be clock master.

In this case, for example, if CPU has 12288000 system clock
and it uses 32bit for each 1ch data (it has divider inside).

	Max 2ch sound Hz = 12288000 / 32 / 2 = 192000Hz
	Max 8ch sound Hz = 12288000 / 32 / 8 =  48000Hz

If my understanding was correct, struct snd_soc_pcm_stream::rates
is needed when sound device "open" timing
(= struct snd_soc_dai_ops::startup), but, we can receive used
channels number when "hw_params" timing ?

My question is that if system has 12288000, and if it can
support both 2ch and 8ch, what struct snd_soc_pcm_stream::rates
should have ??
	SNDRV_PCM_RATE_8000_192000 ?
	SNDRV_PCM_RATE_8000_48000  ?

Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux