All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Subject: How to handle stream rates if CPU supports many channels ?
Date: Tue, 6 Jun 2017 00:48:22 +0000	[thread overview]
Message-ID: <87tw3uymhu.wl%kuninori.morimoto.gx@renesas.com> (raw)


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

             reply	other threads:[~2017-06-06  0:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06  0:48 Kuninori Morimoto [this message]
2017-06-06  3:41 ` How to handle stream rates if CPU supports many channels ? Takashi Sakamoto
2017-06-06  7:04   ` Kuninori Morimoto
2017-06-06 15:22     ` Takashi Sakamoto
2017-06-06 23:41       ` Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tw3uymhu.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hiroyuki.yokoyama.vx@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.