Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: ASOC: Best way to get private data from machine driver to the other drivers?
Date: Tue, 02 Oct 2007 11:48:17 -0500	[thread overview]
Message-ID: <47027651.3020501@freescale.com> (raw)
In-Reply-To: <1191343067.12060.17.camel@localhost.localdomain>

Liam Girdwood wrote:
> On Mon, 2007-10-01 at 16:49 -0500, Timur Tabi wrote:
>> Liam Girdwood wrote:
>>
>>> Could you have a look at the V2 i.mx31 SSI driver and let me know if we
>>> need further changes for better dts support.
>> I'm trying to port the CS4270 codec driver (it's easier) to ASOC v2, and I see 
>> that you don't have snd_pcm_rate_to_rate_bit().  Where did it go?
>>
> 
> We never had a snd_pcm_rate_to_rate_bit() in the ASoC code, perhaps you
> mean something else ?

In may not be part of ASoC, but it's part of ALSA, and I need it.  It's not 
just in your repository.

sound/core/pcm_misc.c

/**
  * snd_pcm_rate_to_rate_bit - converts sample rate to SNDRV_PCM_RATE_xxx bit
  * @rate: the sample rate to convert
  *
  * Returns the SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or
  * SNDRV_PCM_RATE_KNOT for an unknown rate.
  */
unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)
{
	unsigned int i;

	for (i = 0; i < snd_pcm_known_rates.count; i++)
		if (snd_pcm_known_rates.list[i] == rate)
			return 1u << i;
	return SNDRV_PCM_RATE_KNOT;
}
EXPORT_SYMBOL(snd_pcm_rate_to_rate_bit);

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

      reply	other threads:[~2007-10-02 16:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28 21:14 ASOC: Best way to get private data from machine driver to the other drivers? Timur Tabi
2007-10-01 10:53 ` Liam Girdwood
2007-10-01 20:10   ` Timur Tabi
2007-10-02 16:40     ` Liam Girdwood
2007-10-02 16:49       ` Timur Tabi
2007-10-02 16:50       ` Timur Tabi
2007-10-01 21:49   ` Timur Tabi
2007-10-02 16:37     ` Liam Girdwood
2007-10-02 16:48       ` Timur Tabi [this message]

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=47027651.3020501@freescale.com \
    --to=timur@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lg@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox