From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: ext Joonyoung Shim <jy0922.shim@samsung.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
"kyungmin.park@samsung.com" <kyungmin.park@samsung.com>,
"bhmin@samsung.com" <bhmin@samsung.com>
Subject: Re: [PATCH 1/1] ASoC: TWL4030: Add support Voice DAI
Date: Tue, 14 Apr 2009 10:07:51 +0300 [thread overview]
Message-ID: <200904141007.52528.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <49DDFE1D.3090009@samsung.com>
On Thursday 09 April 2009 16:54:37 ext Joonyoung Shim wrote:
> Add Voice DAI to support the PCM voice interface of the twl4030 codec.
>
> The PCM voice interface can be used with 8-kHz(voice narrowband) or 16-kHz
> (voice wideband) sampling rates, and 16bits, and mono RX and mono TX or
> stereo TX.
>
> If the system master clock is not 26MHz, the voice PCM interface is not
> available.
>
> The PCM voice interface has two modes
> - PCM mode1 : This uses the rising edge of the clock signal
> - PCM mode2 : This uses the falling edge of the clock signal
>
> PCM mode1 and mode2 have a look of DSP_A and DSP_B, so we used DSP_A and
> DSP_B.
Both of the PCM mode1 and mode2 is actually DSP_A, but the FS polarity is
inverted and also the data is shifted/sampled on the opposite edge of the
bitclock.
> +static int twl4030_voice_startup(struct snd_pcm_substream *substream,
> + struct snd_soc_dai *dai)
> +{
> + struct snd_soc_pcm_runtime *rtd = substream->private_data;
> + struct snd_soc_device *socdev = rtd->socdev;
> + struct snd_soc_codec *codec = socdev->card->codec;
> + u8 infreq;
> +
> + /* If the system master clock is not 26MHz, the voice PCM interface is
> + * not avilable.
> + */
> + infreq = twl4030_read_reg_cache(codec, TWL4030_REG_APLL_CTL)
> + & TWL4030_APLL_INFREQ;
> +
> + if (infreq != TWL4030_APLL_INFREQ_26000KHZ)
> + return -EPERM;
Would it be feasible to add a check here against the CODEC_MODE:OPT_MODE and
if the codec is not in Option2 mode, than return with error?
--
Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2009-04-14 7:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 13:54 [PATCH 1/1] ASoC: TWL4030: Add support Voice DAI Joonyoung Shim
2009-04-09 14:06 ` Mark Brown
2009-04-10 2:03 ` Joonyoung Shim
2009-04-10 10:22 ` Mark Brown
2009-04-14 7:09 ` Peter Ujfalusi
2009-04-14 7:07 ` Peter Ujfalusi [this message]
2009-04-20 5:31 ` Joonyoung Shim
2009-04-20 6:35 ` Peter Ujfalusi
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=200904141007.52528.peter.ujfalusi@nokia.com \
--to=peter.ujfalusi@nokia.com \
--cc=alsa-devel@alsa-project.org \
--cc=bhmin@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.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.