Hello,
I recently cloned: git clone git://git.alsa-project.org/alsa-lib.git alsa-lib git clone git://git.alsa-project.org/alsa-utils.git alsa-utils and switched to the "ucm" branch to give it try. I have a panda board (pandaboard.org it is just a TI OMAP4 platform).
I created some configuration files for my card. My conf file is 'SDP4430.conf' and my verb is on 'hifi'. I came with a simple program to set my verb and configure it for a simple device. I'm calling this sequence: 1. open it.... snd_use_case_mgr_open(&uc_mgr,"SDP4430") 2. reset it ....snd_use_case_mgr_reset(uc_mgr) 3. query for my verb.... snd_use_case_get_list(uc_mgr,"_verbs",&mylist) 4. set my verb ... snd_use_case_set(uc_mgr,"_verb",*mylist) 5. set my created device... snd_use_case_set(uc_mgr,"_enadev","Headset.0") 6. close it... snd_use_case_mgr_close(uc_mgr)
Seems to work ok (without any errors) but I can't see any of my amixer controls set/changed accordingly to my verb/device. Is this a right sequence to follow? may be my files are not well written?
Thanks for your help! Abraham
On Wed, 2010-11-03 at 14:38 -0600, abraham duenas wrote:
Hello,
I recently cloned: git clone git://git.alsa-project.org/alsa-lib.git alsa-lib git clone git://git.alsa-project.org/alsa-utils.git alsa-utils and switched to the "ucm" branch to give it try. I have a panda board (pandaboard.org it is just a TI OMAP4 platform).
Ok, this is the correct repository.
I created some configuration files for my card. My conf file is 'SDP4430.conf' and my verb is on 'hifi'. I came with a simple program to set my verb and configure it for a simple device. I'm calling this sequence:
- open it.... snd_use_case_mgr_open(&uc_mgr,"SDP4430")
- reset it ....snd_use_case_mgr_reset(uc_mgr)
- query for my verb.... snd_use_case_get_list(uc_mgr,"_verbs",&mylist)
- set my verb ... snd_use_case_set(uc_mgr,"_verb",*mylist)
- set my created device... snd_use_case_set(uc_mgr,"_enadev","Headset.0")
- close it... snd_use_case_mgr_close(uc_mgr)
Seems to work ok (without any errors) but I can't see any of my amixer controls set/changed accordingly to my verb/device. Is this a right sequence to follow? may be my files are not well written?
This sequence looks correct. Can you share with us the relevant parts of your configuration files.
Jaroslav did make some changes to the config file format so maybe we have a formatting problem here.
Liam
Sure, I put the following files under /usr/shara/alsa/ucm/SDP4430/ : - SDP4430.conf - hifi
SDP4430.conf looks like this:
# UCM configuration for SDP4430 SectionUseCase."HiFi" { File "hifi" Comment "Play and record HiFi quality Music." }
SectionDefaults [ cset "name='Capture Preamplifier Volume',index=2 0,0" exec "echo Im setting defaults" cset "name='Capture Volume',index=2 0,0" cset "name='Aux FM Volume',index=2 0,0" cset "name='Headset Playback Volume',index=2 0,0" cset "name='Handsfree Playback Volume',index=2 0,0" cset "name='Earphone Playback Volume',index=1 0" cset "name='Earphone Driver Switch',index=1 0" cset "name='HS Right Playback',index=1 0" cset "name='HS Left Playback',index=1 0" cset "name='HF Right Playback',index=1 0" cset "name='HF Left Playback',index=1 0" cset "name='Analog Right Capture Route',index=1 3" cset "name='Analog Left Capture Route',index=1 3" cset "name='DL1 Media Playback Volume',index=1 0" cset "name='DL1 Tones Playback Volume',index=1 0" cset "name='DL1 Voice Playback Volume',index=1 0" cset "name='DL1 Capture Playback Volume',index=1 0" cset "name='DL2 Media Playback Volume',index=1 0" cset "name='DL2 Tones Playback Volume',index=1 0" cset "name='DL2 Voice Playback Volume',index=1 0" cset "name='DL2 Capture Playback Volume',index=1 0" cset "name='MM_EXT_UL Capture Switch',index=1 0" cset "name='MM_EXT_DL Playback Switch',index=1 0" cset "name='BT_VX_DL Playback Switch',index=1 0" cset "name='PDM_DL Playback Switch',index=1 0" cset "name='Sidetone Mixer Capture',index=1 0" cset "name='Sidetone Mixer Playback',index=1 0" cset "name='Capture Mixer Tones',index=1 0" cset "name='Capture Mixer Voice Playback',index=1 0" cset "name='Capture Mixer Voice Capture',index=1 0" cset "name='Capture Mixer Media Playback',index=1 0" cset "name='Voice Capture Mixer Tones Playback',index=1 0" cset "name='Voice Capture Mixer Media Playback',index=1 0" cset "name='Voice Capture Mixer Capture',index=1 0" cset "name='DL2 Mixer Tones',index=1 0" cset "name='DL2 Mixer Voice',index=1 0" cset "name='DL2 Mixer Capture',index=1 0" cset "name='DL2 Mixer Multimedia',index=1 0" cset "name='DL1 Mixer Tones',index=1 0" cset "name='DL1 Mixer Voice',index=1 0" cset "name='DL1 Mixer Capture',index=1 0" cset "name='DL1 Mixer Multimedia',index=1 0" cset "name='MUX_VX1',index=1 0" cset "name='MUX_VX0',index=1 0" cset "name='MUX_UL11',index=1 0" cset "name='MUX_UL10',index=1 0" cset "name='MUX_UL07',index=1 0" cset "name='MUX_UL06',index=1 0" cset "name='MUX_UL05',index=1 0" cset "name='MUX_UL04',index=1 0" cset "name='MUX_UL03',index=1 0" cset "name='MUX_UL02',index=1 0" cset "name='MUX_UL01',index=1 0" cset "name='MUX_UL00',index=1 0" cset "name='TWL6040 Power Mode',index=1 0" ]
and my "hifi" file:
# Use case Configuration for TI SDP4430 HiFi Music
SectionVerb { EnableSequence [ cset "name='DL1 Media Playback Volume',index=1 90" cset "name-'DL2 Media Playback Volume',index=1 90" ]
DisableSequence [ cset "name='DL1 Media Playback Volume',index=1 0" cset "name='DL2 Media Playback Volume',index=1 0" ]
# QoS and ALSA PCMs Value { TQ HiFi CapturePCM "hw:0" PlaybackPCM "hw:0" } }
SectionDevice."Headset".0 { Comment "SDP4430 3.5mm Headset" EnableSequence [ cset "name='DL1 Mixer Multimedia',index=0 0" cset "name='Sidetone Mixer Playback',index=1 1" cset "name='HS Right Playback',index=1 0" cset "name='HS Left Playback',index=1 0" cset "name='MUX_UL11',index=1 9" cset "name='MUX_UL10',index=1 10" ]
DisableSequence [ cset "name='DL1 Mixer Multimedia',index=1 0" cset "name='MUX_UL11',index=1 0" cset "name='MUX_UL10',index=1 0" cset "name='HS Right Playback',index=1 0" cset "name='HS Left Playback',index=1 0" cset "name='Sidetone Mixer Playback',index=1 0" ]
Value { MasterPlaybackVolume "name='Headset Playback Volume' 1" MasterCaptureVolume "name='Capture Volume' 1" } }
On Thu, Nov 4, 2010 at 4:09 AM, Liam Girdwood lrg@slimlogic.co.uk wrote:
On Wed, 2010-11-03 at 14:38 -0600, abraham duenas wrote:
Hello,
I recently cloned: git clone git://git.alsa-project.org/alsa-lib.git alsa-lib git clone git://git.alsa-project.org/alsa-utils.git alsa-utils and switched to the "ucm" branch to give it try. I have a panda board (pandaboard.org it is just a TI OMAP4 platform).
Ok, this is the correct repository.
I created some configuration files for my card. My conf file is 'SDP4430.conf' and my verb is on 'hifi'. I came with a simple program to set my verb and configure it for a simple device. I'm calling this sequence:
- open it.... snd_use_case_mgr_open(&uc_mgr,"SDP4430")
- reset it ....snd_use_case_mgr_reset(uc_mgr)
- query for my verb.... snd_use_case_get_list(uc_mgr,"_verbs",&mylist)
- set my verb ... snd_use_case_set(uc_mgr,"_verb",*mylist)
- set my created device... snd_use_case_set(uc_mgr,"_enadev","Headset.0")
- close it... snd_use_case_mgr_close(uc_mgr)
Seems to work ok (without any errors) but I can't see any of my amixer controls set/changed accordingly to my verb/device. Is this a right sequence to follow? may be my files are not well written?
This sequence looks correct. Can you share with us the relevant parts of your configuration files.
Jaroslav did make some changes to the config file format so maybe we have a formatting problem here.
Liam
-- Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
On Thu, 2010-11-04 at 06:57 -0600, abraham duenas wrote:
Sure, I put the following files under /usr/shara/alsa/ucm/SDP4430/ :
- SDP4430.conf
- hifi
Btw, please don't top post here.
[snip]
and my "hifi" file:
# Use case Configuration for TI SDP4430 HiFi Music
SectionVerb { EnableSequence [ cset "name='DL1 Media Playback Volume',index=1 90" cset "name-'DL2 Media Playback Volume',index=1 90" ]
DisableSequence [ cset "name='DL1 Media Playback Volume',index=1 0" cset "name='DL2 Media Playback Volume',index=1 0" ]
# QoS and ALSA PCMs Value { TQ HiFi CapturePCM "hw:0" PlaybackPCM "hw:0" } }
SectionDevice."Headset".0 { Comment "SDP4430 3.5mm Headset"
EnableSequence [ cset "name='DL1 Mixer Multimedia',index=0 0" cset "name='Sidetone Mixer Playback',index=1 1" cset "name='HS Right Playback',index=1 0" cset "name='HS Left Playback',index=1 0" cset "name='MUX_UL11',index=1 9" cset "name='MUX_UL10',index=1 10" ]
DisableSequence [ cset "name='DL1 Mixer Multimedia',index=1 0" cset "name='MUX_UL11',index=1 0" cset "name='MUX_UL10',index=1 0" cset "name='HS Right Playback',index=1 0" cset "name='HS Left Playback',index=1 0" cset "name='Sidetone Mixer Playback',index=1 0" ]
Value { MasterPlaybackVolume "name='Headset Playback Volume' 1" MasterCaptureVolume "name='Capture Volume' 1" } }
This all looks fine to me.
On Thu, Nov 4, 2010 at 4:09 AM, Liam Girdwood lrg@slimlogic.co.uk wrote:
On Wed, 2010-11-03 at 14:38 -0600, abraham duenas wrote:
I created some configuration files for my card. My conf file is 'SDP4430.conf' and my verb is on 'hifi'. I came with a simple program to set my verb and configure it for a simple device. I'm calling this sequence:
- open it.... snd_use_case_mgr_open(&uc_mgr,"SDP4430")
- reset it ....snd_use_case_mgr_reset(uc_mgr)
- query for my verb.... snd_use_case_get_list(uc_mgr,"_verbs",&mylist)
- set my verb ... snd_use_case_set(uc_mgr,"_verb",*mylist)
- set my created device... snd_use_case_set(uc_mgr,"_enadev","Headset.0")
- close it... snd_use_case_mgr_close(uc_mgr)
Seems to work ok (without any errors) but I can't see any of my amixer controls set/changed accordingly to my verb/device. Is this a right sequence to follow? may be my files are not well written?
This sequence looks correct. Can you share with us the relevant parts of your configuration files.
Jaroslav did make some changes to the config file format so maybe we have a formatting problem here.
Jaroslav, any ideas ?
Abraham, can you put some debug in here to see if we are changing the kcontrols or not.
Thanks
Liam
On Thu, 4 Nov 2010, Liam Girdwood wrote:
Jaroslav did make some changes to the config file format so maybe we have a formatting problem here.
Jaroslav, any ideas ?
The cset command is not implemented yet. I'm actually porting the parsing routines from amixer to alsa-lib.
The actual implementation should print error messages something like:
cset not yet implemented
If these messages are not printed, I think that there is an issue with the parser. I'm sorry, but I fight with free time to finish this API.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Thu, 4 Nov 2010, Liam Girdwood wrote:
Value { MasterPlaybackVolume "name='Headset Playback Volume' 1" MasterCaptureVolume "name='Capture Volume' 1"
What does mean '1'? If you like to define element id index, use:
MasterPlaybackVolume "name='Headset Playback Volume',index=1"
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Thu, 2010-11-04 at 19:34 +0100, Jaroslav Kysela wrote:
On Thu, 4 Nov 2010, Liam Girdwood wrote:
Value { MasterPlaybackVolume "name='Headset Playback Volume' 1" MasterCaptureVolume "name='Capture Volume' 1"
What does mean '1'? If you like to define element id index, use:
Ah, that looks a conversion bug from Abrahams old file format to his new format. I guess it caught out the parser too here.
Abraham, could you check over your configuration files and send a patch for the parser that spits an error out here.
MasterPlaybackVolume "name='Headset Playback Volume',index=1"
My preference is not to use the ID since it can sometimes change with driver updates. The names are pretty constant though.
Thanks
Liam
On Thu, 4 Nov 2010, Liam Girdwood wrote:
On Thu, 2010-11-04 at 19:34 +0100, Jaroslav Kysela wrote:
On Thu, 4 Nov 2010, Liam Girdwood wrote:
Value { MasterPlaybackVolume "name='Headset Playback Volume' 1" MasterCaptureVolume "name='Capture Volume' 1"
What does mean '1'? If you like to define element id index, use:
Ah, that looks a conversion bug from Abrahams old file format to his new format. I guess it caught out the parser too here.
Abraham, could you check over your configuration files and send a patch for the parser that spits an error out here.
MasterPlaybackVolume "name='Headset Playback Volume',index=1"
My preference is not to use the ID since it can sometimes change with driver updates. The names are pretty constant though.
You probably mean unique numid for each control? Index is just an index for the ASCII name to distinguish controls with same name (I think that you had a syntax name:index in the original code).
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Thu, 2010-11-04 at 19:52 +0100, Jaroslav Kysela wrote:
On Thu, 4 Nov 2010, Liam Girdwood wrote:
On Thu, 2010-11-04 at 19:34 +0100, Jaroslav Kysela wrote:
On Thu, 4 Nov 2010, Liam Girdwood wrote:
Value { MasterPlaybackVolume "name='Headset Playback Volume' 1" MasterCaptureVolume "name='Capture Volume' 1"
What does mean '1'? If you like to define element id index, use:
Ah, that looks a conversion bug from Abrahams old file format to his new format. I guess it caught out the parser too here.
Abraham, could you check over your configuration files and send a patch for the parser that spits an error out here.
MasterPlaybackVolume "name='Headset Playback Volume',index=1"
My preference is not to use the ID since it can sometimes change with driver updates. The names are pretty constant though.
You probably mean unique numid for each control? Index is just an index for the ASCII name to distinguish controls with same name (I think that you had a syntax name:index in the original code).
I do indeed :)
Thanks
Liam
ok I changed to this form in the SectionDefaults at SDP4430.conf: cset "name='Capture Preamplifier Volume' 0,0" cset "name='Capture Volume' 0,0" cset "name='Aux FM Volume' 0,0" ... and so on.... and on "hifi" is remove all "index=X" references...
Some things I noticed is that at parse_sequence function in /ucm/parser.c the 'const char *id' never matches 'cset' or 'sleep' or 'exec' when parsing SectionDevice of the verb file. And in "execute_sequence" function of the the /ucm/main.c it never gets into the "list_for_each" cycle which in turn would show me the " uc_error("cset not yet implemented: '%s'", s->data.cset);"
On Fri, 2010-11-05 at 15:23 -0600, abraham duenas wrote:
ok I changed to this form in the SectionDefaults at SDP4430.conf: cset "name='Capture Preamplifier Volume' 0,0" cset "name='Capture Volume' 0,0" cset "name='Aux FM Volume' 0,0" ... and so on.... and on "hifi" is remove all "index=X" references...
Some things I noticed is that at parse_sequence function in /ucm/parser.c the 'const char *id' never matches 'cset' or 'sleep' or 'exec' when parsing SectionDevice of the verb file. And in "execute_sequence" function of the the /ucm/main.c it never gets into the "list_for_each" cycle which in turn would show me the " uc_error("cset not yet implemented: '%s'", s->data.cset);"
Ok, so either your config is different compared to Jaroslav's or there is a bug in the parser. I'd expect you to see the "cset not implemented" warning so can you try your Jaroslav's config with your debug trace.
Thanks
Liam
Hello, I think this is missing:
diff --git a/src/ucm/main.c b/src/ucm/main.c index e233f41..a73595d 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -774,9 +774,9 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr, pthread_mutex_lock(&uc_mgr->mutex); if (strcmp(identifier, "_verbs") == 0) err = get_verb_list(uc_mgr, list); - else if (strcmp(identifier, "_enadevs")) + else if (strcmp(identifier, "_enadevs") == 0) err = get_enabled_device_list(uc_mgr, list); - else if (strcmp(identifier, "_enamods")) + else if (strcmp(identifier, "_enamods") == 0) err = get_enabled_modifier_list(uc_mgr, list); else { str1 = strchr(identifier, '/');
And changing the "[" for a "{" in the SectionVerb and SectionDevice like this: SectionVerb { EnableSequence { cset "name='DL1 Media Playback Volume' 90" cset "name='DL2 Media Playback Volume' 90" } .......... SectionDevice."Headset".0 { Comment "SDP4430 3.5mm Headset"
EnableSequence { cset "name='DL1 Mixer Multimedia' 0" cset "name='Sidetone Mixer Playback' 1" cset "name='HS Right Playback' 0" cset "name='HS Left Playback' 0" cset "name='MUX_UL11' 9" cset "name='MUX_UL10' 10" } ...........
I'm getting the expected error ONLY for the last element: listed in the EnableSequence field: e.g: ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='DL2 Media Playback Volume' 90' ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='MUX_UL10' 10'
i'll keep on digging as time permits :)
On Sat, Nov 6, 2010 at 6:26 AM, Liam Girdwood lrg@slimlogic.co.uk wrote:
On Fri, 2010-11-05 at 15:23 -0600, abraham duenas wrote:
ok I changed to this form in the SectionDefaults at SDP4430.conf: cset "name='Capture Preamplifier Volume' 0,0" cset "name='Capture Volume' 0,0" cset "name='Aux FM Volume' 0,0" ... and so on.... and on "hifi" is remove all "index=X" references...
Some things I noticed is that at parse_sequence function in /ucm/parser.c the 'const char *id' never matches 'cset' or 'sleep' or 'exec' when parsing SectionDevice of the verb file. And in "execute_sequence" function of the the /ucm/main.c it never gets into the "list_for_each" cycle which in turn would show me the " uc_error("cset not yet implemented: '%s'", s->data.cset);"
Ok, so either your config is different compared to Jaroslav's or there is a bug in the parser. I'd expect you to see the "cset not implemented" warning so can you try your Jaroslav's config with your debug trace.
Thanks
Liam
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
On Tue, 9 Nov 2010, abraham duenas wrote:
Hello, I think this is missing:
diff --git a/src/ucm/main.c b/src/ucm/main.c index e233f41..a73595d 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -774,9 +774,9 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr, pthread_mutex_lock(&uc_mgr->mutex); if (strcmp(identifier, "_verbs") == 0) err = get_verb_list(uc_mgr, list);
else if (strcmp(identifier, "_enadevs"))
else if (strcmp(identifier, "_enadevs") == 0) err = get_enabled_device_list(uc_mgr, list);
else if (strcmp(identifier, "_enamods"))
else if (strcmp(identifier, "_enamods") == 0) err = get_enabled_modifier_list(uc_mgr, list); else { str1 = strchr(identifier, '/');
I added this fix to my ucm tree. Thaks.
And changing the "[" for a "{" in the SectionVerb and SectionDevice like this: SectionVerb { EnableSequence { cset "name='DL1 Media Playback Volume' 90" cset "name='DL2 Media Playback Volume' 90" } .......... SectionDevice."Headset".0 { Comment "SDP4430 3.5mm Headset"
EnableSequence { cset "name='DL1 Mixer Multimedia' 0" cset "name='Sidetone Mixer Playback' 1" cset "name='HS Right Playback' 0" cset "name='HS Left Playback' 0" cset "name='MUX_UL11' 9" cset "name='MUX_UL10' 10" }
...........
I'm getting the expected error ONLY for the last element: listed in the EnableSequence field: e.g: ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='DL2 Media Playback Volume' 90' ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='MUX_UL10' 10'
i'll keep on digging as time permits :)
I fixed the sequence parser. It should work now ok. So the only missing part is to add the 'snd_ctl_*' backend for cset commands. The parsing functions for ctl strings are available in my ucm branch now:
char *snd_ctl_ascii_elem_id_get(snd_ctl_elem_id_t *id); int snd_ctl_ascii_elem_id_parse(snd_ctl_elem_id_t *dst, const char *str); int snd_ctl_ascii_value_parse(snd_ctl_t *handle, snd_ctl_elem_value_t *dst, snd_ctl_elem_info_t *info, const char *value);
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Wed, 2010-11-10 at 16:11 +0100, Jaroslav Kysela wrote:
On Tue, 9 Nov 2010, abraham duenas wrote:
I'm getting the expected error ONLY for the last element: listed in the EnableSequence field: e.g: ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='DL2 Media Playback Volume' 90' ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='MUX_UL10' 10'
i'll keep on digging as time permits :)
I fixed the sequence parser. It should work now ok. So the only missing part is to add the 'snd_ctl_*' backend for cset commands. The parsing functions for ctl strings are available in my ucm branch now:
Is it the intention to reuse the cset functionality from amixer here ?
Thanks
Liam
On Fri, 12 Nov 2010, Liam Girdwood wrote:
On Wed, 2010-11-10 at 16:11 +0100, Jaroslav Kysela wrote:
On Tue, 9 Nov 2010, abraham duenas wrote:
I'm getting the expected error ONLY for the last element: listed in the EnableSequence field: e.g: ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='DL2 Media Playback Volume' 90' ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='MUX_UL10' 10'
i'll keep on digging as time permits :)
I fixed the sequence parser. It should work now ok. So the only missing part is to add the 'snd_ctl_*' backend for cset commands. The parsing functions for ctl strings are available in my ucm branch now:
Is it the intention to reuse the cset functionality from amixer here ?
Yes, basically to avoid double ASCII syntax for same thing. I expect that the amixer will be recoded to use parser functions implemented in alsa-lib.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Fri, 2010-11-12 at 17:25 +0100, Jaroslav Kysela wrote:
On Fri, 12 Nov 2010, Liam Girdwood wrote:
On Wed, 2010-11-10 at 16:11 +0100, Jaroslav Kysela wrote:
On Tue, 9 Nov 2010, abraham duenas wrote:
I'm getting the expected error ONLY for the last element: listed in the EnableSequence field: e.g: ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='DL2 Media Playback Volume' 90' ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='MUX_UL10' 10'
i'll keep on digging as time permits :)
I fixed the sequence parser. It should work now ok. So the only missing part is to add the 'snd_ctl_*' backend for cset commands. The parsing functions for ctl strings are available in my ucm branch now:
Is it the intention to reuse the cset functionality from amixer here ?
Yes, basically to avoid double ASCII syntax for same thing. I expect that the amixer will be recoded to use parser functions implemented in alsa-lib.
Ok, so with any luck this will mostly involve copy and pasting the cset code from amixer and alsa-lib.
Thanks
Liam
On Fri, 12 Nov 2010, Liam Girdwood wrote:
On Fri, 2010-11-12 at 17:25 +0100, Jaroslav Kysela wrote:
On Fri, 12 Nov 2010, Liam Girdwood wrote:
On Wed, 2010-11-10 at 16:11 +0100, Jaroslav Kysela wrote:
On Tue, 9 Nov 2010, abraham duenas wrote:
I'm getting the expected error ONLY for the last element: listed in the EnableSequence field: e.g: ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='DL2 Media Playback Volume' 90' ALSA lib main.c:137:(execute_sequence) cset not yet implemented: 'name='MUX_UL10' 10'
i'll keep on digging as time permits :)
I fixed the sequence parser. It should work now ok. So the only missing part is to add the 'snd_ctl_*' backend for cset commands. The parsing functions for ctl strings are available in my ucm branch now:
Is it the intention to reuse the cset functionality from amixer here ?
Yes, basically to avoid double ASCII syntax for same thing. I expect that the amixer will be recoded to use parser functions implemented in alsa-lib.
Ok, so with any luck this will mostly involve copy and pasting the cset code from amixer and alsa-lib.
It's done :-) The only missing part is the integration of this code to UCM. Note that my UCM implementation does not assume that only one soundcard can be touched, so we probably need additional command to select the ctl device for which will be cset commands applied. Also, Mark said something that your code used some transformations for controls to specify how the controls will be changed, but not-specified controls will be set from previous (probably default) state, something like this:
1) default initalization - grab actual control values from driver and overwrite with specified values from the configuration file (it can be just subset of all controls provided from the driver) 2) setting verb/mod etc.. - specify just changes for the default state
I think that we can do this with some named control sets and adding commands like:
create_cset (optional filter - which values should be handled or all if not specified) handle_cset - operate with initial or current values (maybe we can have two commands to distincts this behaviour) ... all new cset commands to change the named cset ... apply_cset - push (write) whole cset to the driver
Eventually commands like copy_cset etc. might be implemented. There are plenty of possibilities. My point is that the UCM behaviour should be specified in the configuration files without any hardcoded things.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Fri, Nov 12, 2010 at 05:55:50PM +0100, Jaroslav Kysela wrote:
the ctl device for which will be cset commands applied. Also, Mark said something that your code used some transformations for controls to specify how the controls will be changed, but not-specified controls will be set from previous (probably default) state, something like this:
I'm having a hard time parsing this but I *think* this is the ability to look up a control by virtual function and have it mapped onto an actual physical control (so for example master volume could change depending on output).
participants (4)
-
abraham duenas
-
Jaroslav Kysela
-
Liam Girdwood
-
Mark Brown