alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: shariff <shariffsinbox@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Reg: Audio recording with twl4030 codec
Date: Mon, 25 Jan 2010 13:52:55 +0530	[thread overview]
Message-ID: <1cbe56071001250022n66f271ecu66f12710c8b8e334@mail.gmail.com> (raw)
In-Reply-To: <201001251014.40494.peter.ujfalusi@nokia.com>

Hi Peter,

Thanks for you suggestions.

Regards,
Shariff

On Mon, Jan 25, 2010 at 1:44 PM, Peter Ujfalusi <peter.ujfalusi@nokia.com>wrote:

> Hello,
>
> Let's put alsa-devel back to the CC...
>
> On Monday 25 January 2010 09:32:45 ext shariff wrote:
> > Hi Peter,
> >
> > 1) As we only have one Main MIC when I am recording in stereo mode by
> >  specifying "-c 2", one channel is silent and one channel is recorded
> >  properly.
>
> As it should. Just as a sidenote, I'm usually using -f dat for the format,
> which
> gives 48KHz, stereo 16LE
>
> >
> > 2) But still the recorded channel is noisy, how can I reduce the noise of
> >  the recorded channel?
>
> Hmm, what kind of noise?
> How are you configuring the dai with the snd_soc_dai_set_fmt?
> For stereo it should be (if OMAP is slave, TWL is master):
> SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM;
>
> For TDM mode (four channel):
> SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM;
>
> See omap3beagle.c how it is done.
>
> >
> > I have one more question. ( Regarding Audio path)
> >
> > --->  If I want to avoid that one channel silent, do I need to connect
> "SUB
> >  MIC or AUXR"?( as these are connected  right ADC).
>
> If you want audio data there, than yes you need another mic for the right
> channel.
>
> > ----> If I need to record 4 channel audio without any silent channel do I
> >  need to connect digital microphones also?
>
> You can duplicate the channel 1 and 3 to channel 2 and 4, meaning that you
> route
> the ADCL and ADCR to these channels (TX1 and TX2 path are both analog).
> You can also hook up a stereo digital mic to the digimic1 interface, but
> remember, that the digimic needs 48KHz sampling rate.
>
> --
> Péter
>
> >
> > Regards,
> > Shariff
> >
> > On Fri, Jan 22, 2010 at 6:29 PM, shariff
> >  <shariffsinbox@gmail.com<mailto:shariffsinbox@gmail.com>> wrote: Hi
> Peter,
> >
> > Thank you very much for your suggestions.
> >
> > Regards,
> > Shariff
> >
> >
> > On Fri, Jan 22, 2010 at 6:11 PM, Peter Ujfalusi
> >  <peter.ujfalusi@nokia.com<mailto:peter.ujfalusi@nokia.com>> wrote:
> Hello,
> >
> > On Friday 22 January 2010 11:57:23 ext shariff wrote:
> > > Hi all,
> > >
> > >         I am working with OMAP3 based custom board that has twl4030
> codec
> > > & using linux-2.6.29 kernel from opensource.
> >
> > This is kind of old...
> >
> > >         I have some queries regarding Audio recording.
> > >
> > >        Audio codec is connected to twl4030 as bellow
> > >
> > >                                   TWL4030
> > >
> > >                              |--------------------|
> > >                              |
> > >                              |                    |------ MAINMIC
> > >
> > >       McBSP2  ------  |i2s/tdm         |
> > >
> > >                              | ___________|
> > >
> > >       --> One Analog MIC is connected to Main Mic and I am using Audio
> > > path not the Voice path.
> > >
> > >            After selecting Main Mic through amixer control.
> > >
> > >            and recording audio using "arecord -c 1 -r 8000 -f S16_LE -t
> > > wav -d 20 record-file.wav"
> >
> > The hardware should have been opened in stereo mode, since it is not
> >  supporting the mono, you can verify it by appending -v to arecord and
> see
> >  how the HW has been opened at the end.
> >
> > >        --> Here record is successful but with lot of noise.
> > >
> > >           1) Can we record Mono(1 channel) through I2S from TWL4030
> > > codec?
> >
> > The TWL codec "Audio" path is either stereo or 4 channel.
> > You need to record stereo/4 channel, and than extract/use the data from
> the
> > valid channel.
> > In case of Main mic it is the left channel, or Channel 1 or/and 2
> >  (depending on the routings) in four channel mode.
> >
> > >           2) To record stereo(2 channels), do we need two Mic's ? (i.e
> do
> > > I need Sub Mic also).
> >
> > No you don't need. The right channel will not contain valid data (most
> >  likely it is going to be silent).
> >
> > You need to enable the Mic bias 1 for the main mic in your machine
> driver,
> >  if you have not done that yet:
> >
> > static const struct snd_soc_dapm_widget your_widgets[] = {
> > ...
> >        SND_SOC_DAPM_MIC("Your Mic", NULL),
> > ...
> > };
> >
> > static const struct snd_soc_dapm_route your_audio_map[] = {
> > ...
> >        {"MAINMIC", NULL, "Mic Bias 1"},
> >        {"Mic Bias 1", NULL, "Your Mic"},
> > ...
> > };
> >
> > I'm not sure about the state of the twl soc codec driver in 2.6.29, but
> my
> >  guess is that it should work.
> >
> > Are there any capture routing option for TX1 path, which selects between
> >  Analog and Digimic0? If there is than that has to be set to analog as
> >  well.
> >
> > > Regards,
> > > Shariff
> >
> > --
> > Péter
> >
>

      reply	other threads:[~2010-01-25  8:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-22  9:57 Reg: Audio recording with twl4030 codec shariff
2010-01-22 12:41 ` Peter Ujfalusi
     [not found] ` <1cbe56071001220459n511c41d7ya117ca8b19c11ae5@mail.gmail.com>
     [not found]   ` <1cbe56071001242332r4fcf5a3dyd509750e39ca9377@mail.gmail.com>
2010-01-25  8:14     ` Peter Ujfalusi
2010-01-25  8:22       ` shariff [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=1cbe56071001250022n66f271ecu66f12710c8b8e334@mail.gmail.com \
    --to=shariffsinbox@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=peter.ujfalusi@nokia.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;
as well as URLs for NNTP newsgroup(s).