All of lore.kernel.org
 help / color / mirror / Atom feed
* How to handle stream rates if CPU supports many channels ?
@ 2017-06-06  0:48 Kuninori Morimoto
  2017-06-06  3:41 ` Takashi Sakamoto
  0 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2017-06-06  0:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Hiroyuki Yokoyama


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-06 23:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-06  0:48 How to handle stream rates if CPU supports many channels ? Kuninori Morimoto
2017-06-06  3:41 ` Takashi Sakamoto
2017-06-06  7:04   ` Kuninori Morimoto
2017-06-06 15:22     ` Takashi Sakamoto
2017-06-06 23:41       ` Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.