Skip to contentSkip to conversation

Help on specifying 'chmap' in asound.conf

DISCUSSION Takashi Iwai 3 participants 4 messages Jul 16, 2024 – Jul 19, 2024 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Dear all,

I am having a question regarding how to specify 'champ' for a
plugin. I do not see any examples of this. I tried many ways to specify but failed.

As indicated by the link below, I can specify the MAP as a string
array. Can someone provide one example on how exactly this [chmap
MAP] can be specified?

"
pcm.name {
type cras
[chmap MAP] # Provide channel maps; MAP is a string array
}
"
https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html

I can something like these, but none of these work for me.

chmap LFE
chmap "LFE"
chmap FR,FL,LFE
champ "FR,FL,LFE"

Thanks!

Xinhui,

#4 lore raw
Quoted 20 lines · Xinhui Zhou

Dear all,

I am having a question regarding how to specify 'champ' for a
plugin. I do not see any examples of this. I tried many ways to specify but failed.

As indicated by the link below, I can specify the MAP as a string
array. Can someone provide one example on how exactly this [chmap
MAP] can be specified?

"
pcm.name {
type cras
[chmap MAP] # Provide channel maps; MAP is a string array
}
"
https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html

Quoted 6 lines

I can something like these, but none of these work for me.

chmap LFE
chmap "LFE"
chmap FR,FL,LFE
champ "FR,FL,LFE"

You need to define a composite array, e.g. pass like

    chmap [ "FL,FR" ]

instead.

For multiple configurations, you can put more items such as

    chmap [ "FC" "FL,FR" "FL,FR,FC,LFE" ]

HTH,

Takashi

#5 lore raw

For that matter, which ALSA source files do the parsing ? From my old/distant memories, ALSA is silent about mistakes made by user when the user provides various configuration files. So, there must be a way to resolve the issue of silent ignoring of user mistakes.

A possible temporary solution would be to "trace" (e.g. by inserting diagnostic print statements) parsing of provided by user configuration files, and to implement this one has to know where to insert the diagnostic print statements, and that's why I'm asking the question.

--Sergei.

Quoted 44 lines · Takashi Iwai
Quoted 19 lines · Xinhui Zhou

Dear all,

I am having a question regarding how to specify 'champ' for a
plugin. I do not see any examples of this. I tried many ways to specify but failed.

As indicated by the link below, I can specify the MAP as a string
array. Can someone provide one example on how exactly this [chmap
MAP] can be specified?

"
pcm.name {
type cras
[chmap MAP] # Provide channel maps; MAP is a string array
}
"
https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html

Quoted 6 lines

I can something like these, but none of these work for me.

chmap LFE
chmap "LFE"
chmap FR,FL,LFE
champ "FR,FL,LFE"

You need to define a composite array, e.g. pass like

     chmap [ "FL,FR" ]

instead.

For multiple configurations, you can put more items such as

     chmap [ "FC" "FL,FR" "FL,FR,FC,LFE" ]

HTH,

Takashi

_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user

#6 lore raw
Quoted 5 lines · Sergei Steshenko

For that matter, which ALSA source files do the parsing ? From my old/distant memories, ALSA is silent about mistakes made by user when the user provides various configuration files. So, there must be a way to resolve the issue of silent ignoring of user mistakes.

The parsing of a config is performed at each PCM plugin code. In particular case for chmap, pcm_hw.c, pcm_null.c and pcm_route.c call _snd_pcm_parse_config_chmaps() helper and deal with the parsed data.

And, in most cases, alsa-lib rather complains (even verbosely) if something goes wrong in the config file. But the interpretation of each config leaf is done in each PCM plugin code, and some might just ignore the errors. But that's not a general case.

Quoted 4 lines

A possible temporary solution would be to "trace" (e.g. by inserting diagnostic print statements) parsing of provided by user configuration files, and to implement this one has to know where to insert the diagnostic print statements, and that's why I'm asking the question.

I understand that debugging the config stuff is sometimes messy, yeah. Some more verbose debug output would be helpful, indeed.

Takashi

Quoted 48 lines

--Sergei.

Quoted 44 lines · Takashi Iwai
Quoted 19 lines · Xinhui Zhou

Dear all,

I am having a question regarding how to specify 'champ' for a
plugin. I do not see any examples of this. I tried many ways to specify but failed.

As indicated by the link below, I can specify the MAP as a string
array. Can someone provide one example on how exactly this [chmap
MAP] can be specified?

"
pcm.name {
type cras
[chmap MAP] # Provide channel maps; MAP is a string array
}
"
https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html

Quoted 6 lines

I can something like these, but none of these work for me.

chmap LFE
chmap "LFE"
chmap FR,FL,LFE
champ "FR,FL,LFE"

You need to define a composite array, e.g. pass like

     chmap [ "FL,FR" ]

instead.

For multiple configurations, you can put more items such as

     chmap [ "FC" "FL,FR" "FL,FR,FC,LFE" ]

HTH,

Takashi

_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user