alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: pl bossart <bossart.nospam@gmail.com>
Cc: Margarita Olaya <magi@slimlogic.co.uk>,
	ALSA development <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Colin Guthrie <gmane@colin.guthr.ie>
Subject: Re: Pulseaudio UCM integration - (Was:UCM list/set/get)
Date: Thu, 03 Feb 2011 16:08:37 +0000	[thread overview]
Message-ID: <1296749317.3456.121.camel@odin> (raw)
In-Reply-To: <AANLkTiknZgB4Y6+yao1t=dhAabi-mAsuD9DZ2s9umBPn@mail.gmail.com>

On Thu, 2011-02-03 at 09:31 -0600, pl bossart wrote:
> >> Also, more work
> >> is required to separate ALSA card from UCM card (to support virtual or
> >> mixed "soundcards").
> >
> > Agreed, but Margarita will initially be targeting a simpler system with
> > one sound card and then move on to support a virtual sound card.
> 
> I quickly looked at the code. Interesting. I was thinking of a
> different approach where a separate pulseaudio module would open the
> use case manager, get the list of cards and verbs. this would be done
> on startup. Doing this inside module-alsa-card results in redundant
> activity, you're going to re-open and read the verbs for each card.
> 

I should say that the initial design and patch implementation was
carried out before Jaroslav added the virtual card support. The initial
plan was to compute UCM values per card at startup.

This code is also experimental, Margarita planned to see what worked
best with one card at first before moving to virtual card support.

> I am also concerned about the card_set_profile() code in module-alsa-card
>    if (nd->profile->is_ucm) {
>         pa_log_debug("set UCM %s", nd->profile->name + 4);
>         return snd_use_case_set(nd->profile->uc_mgr, verb,
> nd->profile->name + 4);
>     }
> There's an awful amount of code after the return to handle multiple
> sinks that may become active for a given profile. Even if you have a
> single card, it's not clear to me how multiple devices would be
> handled (eg. voice, music, tones in the 4430 case) if you bypass this
> code. Are they considered as different sinks from a PulseAudio
> perspective? The routing and how devices allowed in a specific use
> case are exposed in PulseAudio isn't clear to me at all.
> 

I don't think Margarita has got this far yet.

> Last, looking at the code, I saw this comment
> 	/* FIXME: UCM needs to provide API to acquire verb comments */
> A change is not needed, the list of verbs already comes as verb0,
> comment0, verb1, comment1, etc.

Again, this comment was from the ancient code.

> My $0.02
> -Pierre

I've CC'ed Colin for his $0.02 too. I do agree though, that with virtual
card support it does seem right to create a new Pulseaudio module to
manage UCM.

At a high level, the new module could :-

Compute use cases for each sound device at init {
	if (ucm config exists)
		use UCM config
	else
		use existing config method
}

Whilst Pulseaudio would use computed use case values for every new
client stream (using module-intended-roles ?).

Thoughts ?

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

      reply	other threads:[~2011-02-03 16:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28 17:36 UCM list/set/get pl bossart
2011-01-31 11:22 ` Mark Brown
2011-01-31 13:53   ` Liam Girdwood
2011-01-31 14:07     ` Jaroslav Kysela
2011-01-31 21:57       ` pl bossart
2011-01-31 22:40         ` Jaroslav Kysela
2011-01-31 23:44     ` Margarita Olaya
2011-02-02  8:11       ` Jaroslav Kysela
2011-02-02 20:42         ` Liam Girdwood
2011-02-03 15:31           ` pl bossart
2011-02-03 16:08             ` Liam Girdwood [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=1296749317.3456.121.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=bossart.nospam@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gmane@colin.guthr.ie \
    --cc=magi@slimlogic.co.uk \
    /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).