[pulseaudio-discuss] [RFC] Alsa UCM integration.
magi at slimlogic.co.uk
Sun Feb 27 20:53:44 PST 2011
On Sat, Feb 26, 2011 at 2:07 AM, Tanu Kaskinen <tanuk at iki.fi> wrote:
> On Fri, 2011-02-25 at 14:09 -0600, Margarita Olaya wrote:
>> > Make sense.
>> > But I am not sure the profiles as defined today in PulseAudio can work
>> > with modifiers. What we discussed yesterday is that when a profile is
>> > selected then you would set the UCM verb and know about all possible
>> > sinks. We would need additional logic to have profile modifiers, or we
>> > would need extra profiles to represent all possible combinations
>> > (speech, speech+tone, speech+music, etc).
>> The initial idea is to use the UCM data to generate the card profiles,
>> then when the stream is open PA will use his method to select the
>> profile and set the verb. e.g when UCM is present: profile = verb.
>> In the UCM module the data is store in a proplist per verb, the
>> proplist has the following info:
>> PA_PROP_UCM_SINK -> "PlaybackPCM"
>> PA_PROP_UCM_SOURCE -> "CapturePCM"
>> PA_PROP_UCM_PLAYBACK_VOLUME -> "PlaybackVolume"
>> PA_PROP_UCM_PLAYBACK_SWITCH -> "PlaybackSwitch"
>> PA_PROP_UCM_CAPTURE_VOLUME -> "CaptureVolume"
>> PA_PROP_UCM_CAPTURE_SWITCH -> "CaptureSwitch"
>> PA_PROP_UCM_QOS -> "TQ"
> This means that there's only one sink and source per verb. That's
> probably ok, but if profile = verb, then this also means that there's
> only one sink and source per profile.
Yes, this correct.
>That makes it impossible to have
> two verbs (or is it verb+modifier in UCM speak?) active at the same time
> on one card.
A modifier is a complement to the verb, there are linked e.g you can
not set a modifier if the corresponding verb has not been set. A
modifier is like an extension of the verb.
> I don't know what would be the right solution to this problem. I don't
> know enough about UCM concepts even to try to propose any solution. Is
> there any documentation?
You can find some info at http://www.slimlogic.co.uk/?p=40, the link
to the sample files is not working but It will be fixed asap.
>> plus the list of devices e.g headphone, headset and modifiers e.g
>> "play tone", "play music", etc.
> I thought verbs were the concept for abstract devices, but apparently I
> was wrong. Are verbs then stream types? If they are, I think Pulseaudio
> shouldn't create profiles based on verbs. The profiles should be created
> based on the devices. You mention headphone and headset as examples of
> devices - do they also have the same set of properties defined by UCM,
> that is, playback PCM, capture PCM, and mixer element names for volume
> and mute?
A verb is an audio configuration for a determined use case, so it is
mainly a group of ALSA kcontrols plus some useful information to
configure the audio when a stream is opened.
Lets say that you want to listen music in cardX, you need to set the
following controls in order to configure your hardware
cset name='Handsfree Playback Volume' 15
cset name='HF Left Playback' 1
cset name='HF Right Playback' 1
cset name='DL2 Mixer Multimedia' 1
cset name='DL2 Media Playback Volume' 130
you want also specify what PCM will be used for listening music
you know that you can use two devices with this configuration, headset
and handsfree then you have:
Also, it is posible that a tone be played simultaneously so you will
need to set two more controls, so you have modifier of the use case.
cset name='DL2 Mixer Tones' 1
cset name='DL2 Tones Playback Volume' 130
All this info will form a verb e.g "HiFi"
I hope I'm providing a good example, otherwise let me know.
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
More information about the pulseaudio-discuss