alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Simon <horms@verge.net.au>, Tim Cussins <timcussins@eml.cc>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 0/20] ASoC: rsnd: add Synchronous SRC and U/O error salvage support
Date: Thu, 08 Jan 2015 11:44:44 -0600	[thread overview]
Message-ID: <54AEC20C.90706@linux.intel.com> (raw)
In-Reply-To: <87a91vp6s8.wl%kuninori.morimoto.gx@renesas.com>

On 1/6/15 10:12 PM, Kuninori Morimoto wrote:
>
> Hi Mark
>
> Thank you for your feedback
>
>>> 2nd "dynamic" rate convert which is this patch is used as revision.
>>> I don't know detail of use case, but, according to HW team,
>>> sound clock has small accidental error.
>>> Because of this, if we used 48kHz sound in long term,
>>> but, the real sound can be 48001 Hz or 47999 Hz or something like that.
>>> So, if we use it without revision in long term, the sound will has
>>> small noise. This will be problem for TV or radio (?).
>>> Thus, sound player wants to revise it by "dynamic" rate convert.
>>> I guess DPCM is good match for "static" rate convert, but not good
>>> for "dynamic".
>>
>> In general it should be fine for anything - the driver for the SoC
>> shouldn't need to understand why the rates are being converted, it
>> should let the system integration worry about picking the rates.  That
>> way we can more easily make the frameworks smarter and get benefits over
>> all machines.
>>
>> Though having said that I'm a little confused as to what exactly this
>> control is intended for - am I right in thinking that what's actually
>> going on here is that something in userspace is measuring the actual
>> measured rate and feeding that information back to the DSP for
>> correction?  If that's the case that does seem reasonable but also like
>> we ought to have a general control interface for it.
>
> Yes, you are correct.
> Actually, I don't know detail of this userspace.
> (How does it measure actual rate)
> But, message actual rate -> feedback to SoC is the purpose.
> (if actual rate was slow -> clock up, actual rate was fast -> clock down)

This matches my definition of an asynchronous SRC. I really don't get 
what 'synchronous' means here, and it'd seem odd anyway to have 1Hz 
granularity for the updates?

> Is this "general control interface" means
> "implemented under framework, not drvier" ?
>
>> Adding Tim and Pierre since they might have views if my guess is
>> correct, I could be wrong though.

I'd be good to have a snd_pcm_set_rate() generic framework, but I wonder 
if it's practical. Hardware with ASRC or tunable PLLs isn't very common 
except in pro audio, stb, networking and automotive, and usually has 
specific M/N dividers or rates, I am not sure it can be done 
generically. Also most servo loops are implemented in firmware or in 
environments that don't use Linux, not sure how many people would 
benefit from such additions. At the same time people usually don't use 
ALSA in such environments because it doesn't do what they want, so it 
might be worth relooking at adjustable clocks, presentation timestamps, 
PCR, etc.

  reply	other threads:[~2015-01-08 17:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  8:02 [PATCH 0/20] ASoC: rsnd: add Synchronous SRC and U/O error salvage support Kuninori Morimoto
2014-11-27  8:02 ` [PATCH 01/20] ASoC: rsnd: add .fallback callback Kuninori Morimoto
2014-11-27  8:02 ` [PATCH 02/20] ASoC: rsnd: add callback status check method Kuninori Morimoto
2014-11-27  8:03 ` [PATCH 03/20] ASoC: rsnd: rsnd_src_ssiu_stop() stops SSIU compulsorily Kuninori Morimoto
2014-11-27  8:05 ` [PATCH 04/20] ASoC: rsnd: tidyup PIO/DMA mode settings method Kuninori Morimoto
2014-11-27  8:05 ` [PATCH 05/20] ASoC: rsnd: tidyup SSI interrupt enable/disable method Kuninori Morimoto
2014-11-27  8:05 ` [PATCH 06/20] ASoC: rsnd: care SSIWSR register in rsnd_ssi_hw_start() Kuninori Morimoto
2014-11-27  8:05 ` [PATCH 07/20] ASoC: rsnd: clear status register when HW start Kuninori Morimoto
2014-11-27  8:05 ` [PATCH 08/20] ASoC: rsnd: synchronize SSI start/stop sequence between PIO/DMA mode Kuninori Morimoto
2014-11-27  8:06 ` [PATCH 09/20] ASoC: rsnd: show master clock rate when ADG probe Kuninori Morimoto
2014-11-27  8:06 ` [PATCH 10/20] ASoC: rsnd: move snd_kcontrol_new fucntions to core.c Kuninori Morimoto
2014-11-27  8:06 ` [PATCH 11/20] ASoC: rsnd: tidyup rsnd_io_to_runtime() macro Kuninori Morimoto
2014-11-27  8:06 ` [PATCH 12/20] ASoC: rsnd: use rsnd_src_convert_rate() once on rsnd_src_set_convert_rate_gen2() Kuninori Morimoto
2014-11-27  8:06 ` [PATCH 13/20] ASoC: rsnd: initialize SRC on rsnd_src_init() Kuninori Morimoto
2014-11-27  8:07 ` [PATCH 14/20] ASoC: rsnd: set SRC_ROUTE_MODE0 on each rsnd_src_set_convert_rate() Kuninori Morimoto
2014-11-27  8:07 ` [PATCH 15/20] ASoC: rsnd: share SSI starting method between PIO/DMA mode Kuninori Morimoto
2014-11-27  8:07 ` [PATCH 16/20] ASoC: rsnd: remove un-necessary parameter from rsnd_src_start/stop() Kuninori Morimoto
2014-12-03 18:52   ` Mark Brown
2014-11-27  8:07 ` [PATCH 17/20] ASoC: rsnd: add Synchronous SRC mode Kuninori Morimoto
2014-11-27  8:07 ` [PATCH 18/20] ASoC: rsnd: add salvage support for under/over flow error on SSI Kuninori Morimoto
2014-12-07 13:45   ` Mark Brown
2014-11-27  8:08 ` [PATCH 19/20] ASoC: rsnd: add salvage support for under/over flow error on SRC Kuninori Morimoto
2014-11-27  8:08 ` [PATCH 20/20] ASoC: rsnd: rename SSI function name of PIO Kuninori Morimoto
2014-12-07 13:46   ` Mark Brown
2014-12-24  2:01 ` [PATCH 0/20] ASoC: rsnd: add Synchronous SRC and U/O error salvage support Kuninori Morimoto
2014-12-30 17:10   ` Mark Brown
2015-01-05  0:42     ` Kuninori Morimoto
2015-01-06 18:33       ` Mark Brown
2015-01-07  4:12         ` Kuninori Morimoto
2015-01-08 17:44           ` Pierre-Louis Bossart [this message]
2015-01-10 11:32             ` Mark Brown
2015-01-14  1:11               ` Kuninori Morimoto
2015-01-19 20:49                 ` Mark Brown
2015-01-20  2:10                   ` Kuninori Morimoto
2015-02-24 14:56                     ` Mark Brown
2015-01-08  1:50 ` Kuninori Morimoto
2015-01-08  1:52   ` [PATCH v2] ASoC: rsnd: add recovery support for under/over flow error on SRC Kuninori Morimoto
2015-01-12 13:03     ` Mark Brown
2015-01-13  7:20       ` Kuninori Morimoto
2015-01-15 15:58         ` Mark Brown
2015-01-16  0:08           ` 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=54AEC20C.90706@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=timcussins@eml.cc \
    /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).