[pulseaudio-discuss] [PATCH 2/4] alsa-ucm: Don't probe UCM

Arun Raghavan arun.raghavan at collabora.co.uk
Wed Sep 18 20:26:32 PDT 2013


On Wed, 2013-09-18 at 21:26 +0200, David Henningsson wrote:
> On 09/18/2013 07:41 PM, Felipe Tonello wrote:
> > Hi David,
> > 
> > On Wed, Sep 18, 2013 at 7:01 AM, David Henningsson
> > <david.henningsson at canonical.com> wrote:
> >> In case of UCM, it usually targets a very specific hardware. The
> >> person writing the UCM file for that hardware knows what (s)he is
> >> doing, hopefully.
> >>
> >> Does it harm to probe all verbs at startup? Yes, because it can
> >> cause longer startup time, clicks, or other side effects.
> >>
> >> (This is a difference to the normal probing mechanism, where we try
> >> to make one profile set file fit many different sound cards, hence
> >> we need probing there. But not here.)
> >>
> >> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
> >> ---
> >>  src/modules/alsa/alsa-ucm.c |    4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
> >> index 81d0aeb..ab23259 100644
> >> --- a/src/modules/alsa/alsa-ucm.c
> >> +++ b/src/modules/alsa/alsa-ucm.c
> >> @@ -1367,6 +1367,7 @@ static int ucm_create_profile(
> >>      return 0;
> >>  }
> >>
> >> +#if 0
> >>  static snd_pcm_t* mapping_open_pcm(pa_alsa_ucm_config *ucm, pa_alsa_mapping *m, int mode) {
> >>      snd_pcm_t* pcm;
> >>      pa_sample_spec try_ss = ucm->core->default_sample_spec;
> >> @@ -1514,6 +1515,7 @@ static void ucm_probe_profile_set(pa_alsa_ucm_config *ucm, pa_alsa_profile_set *
> >>
> >>      pa_alsa_profile_set_drop_unsupported(ps);
> >>  }
> >> +#endif
> >>
> >>  pa_alsa_profile_set* pa_alsa_ucm_add_profile_set(pa_alsa_ucm_config *ucm, pa_channel_map *default_channel_map) {
> >>      pa_alsa_ucm_verb *verb;
> >> @@ -1539,7 +1541,7 @@ pa_alsa_profile_set* pa_alsa_ucm_add_profile_set(pa_alsa_ucm_config *ucm, pa_cha
> >>          ucm_create_profile(ucm, ps, verb, verb_name, verb_desc);
> >>      }
> >>
> >> -    ucm_probe_profile_set(ucm, ps);
> >> +/*    ucm_probe_profile_set(ucm, ps); */
> >>      ps->probed = true;
> >>
> >>      return ps;
> > 
> > Why not just remove the code?
> 
> This is just the first draft. We might end up with some way of
> configuring whether to probe or not (suggestions welcome).

Summarising IRC discussion:

* The lags, pops, clicks etc. are likely UCM bugs, and having probing
off by default is likely to cause these to not be fixed.

* I'm okay with an on-by-default "probe" modarg to disable probing in
module-alsa-card

* We were thinking about a special PA-specific Value to allow passing
such parameters to PA. In this case, it would need to be at the card
config level.

-- Arun



More information about the pulseaudio-discuss mailing list