alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: James Courtier-Dutton <james.dutton@gmail.com>
To: Ramesh Babu <ramesh.babu@linux.intel.com>
Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
	Liam Girdwood <lrg@ti.com>
Subject: Re: ASoC:Question rate constraint between the dais
Date: Mon, 19 Mar 2012 16:12:42 +0000	[thread overview]
Message-ID: <CAAMvbhEoMYzgEwYo-461DDCps8UYBpUdRoNeFb4-e2b9Lyttvg@mail.gmail.com> (raw)
In-Reply-To: <64362.10.252.27.21.1331805184.squirrel@linux.intel.com>

On 15 March 2012 09:53, Ramesh Babu <ramesh.babu@linux.intel.com> wrote:
> Hi
>
> I would like to understand how to handle the different sampling rates
> between dais.
>
> I need to make sure that all simultaneous playback and capture (across the
> all dai_links) needs to be of same frequency family.
> If the sampling frequency of  a new request is different from ongoing
> playback/capture, then it needs to be rejected.
>
> How do I handle it in machine driver?
>

A more deterministic method to do this would be have a mixer setting
to select the sample rate on a card wide bases.
Then all applications will only have one sample rate to choose from.
FYI: All EMU sound cards do it this way.
If the user wishes to change the sample rate, they close down all the
applications using the old rate, change the mixer setting, and then
start the apps up at the new rate.
Then applications that wish to use different sample rates, will need
to provide a sample rate conversion function.
A majority of the sound cards out there do 48KHz well, but not so well
on other rates, so defaulting to 48KHz is probably the best choice.
I know pulseaudio falls over hopelessly if it is set to 44.1KHz and
some USB web cam can only do 48KHz for the MIC.
Setting everything to 48KHz cures a lot of problems.
One of the most difficult things is getting 44.1KHz MP3s etc.
resampled to 48KHz, but most MP3 playing apps support good resamplers
so they can still talk to pulseaudio at 48KHz.

Kind Regards

James
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2012-03-19 16:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15  9:53 ASoC:Question rate constraint between the dais Ramesh Babu
2012-03-15 17:53 ` Mark Brown
2012-03-15 21:28   ` Trent Piepho
2012-03-16 19:25     ` Mark Brown
2012-03-16 20:00       ` Lars-Peter Clausen
2012-03-17 11:41         ` Mark Brown
2012-03-17 13:00         ` Clemens Ladisch
     [not found]   ` <9DF50024A2F6A5439EBFE2E74F4E9198055254@BGSMSX101.gar.corp.intel.com>
2012-03-16 10:05     ` Omair Mohammed Abdullah
2012-03-16 19:22       ` Mark Brown
2012-03-16 22:01         ` Trent Piepho
2012-03-17 11:48           ` Mark Brown
2012-03-17 19:49             ` Trent Piepho
2012-03-17 20:31               ` Mark Brown
2012-03-18  6:22               ` Jassi Brar
2012-03-18 21:27                 ` Mark Brown
2012-03-19 16:12 ` James Courtier-Dutton [this message]
2012-03-19 16:32   ` Mark Brown

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=CAAMvbhEoMYzgEwYo-461DDCps8UYBpUdRoNeFb4-e2b9Lyttvg@mail.gmail.com \
    --to=james.dutton@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=ramesh.babu@linux.intel.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).