* Help on specifying 'chmap' in asound.conf [not found] ` <c21f506a-255e-5885-7dde-f9716187536e@sc-riebe.de> @ 2024-07-16 6:09 ` Xinhui Zhou 2024-07-16 15:57 ` Takashi Iwai 0 siblings, 1 reply; 4+ messages in thread From: Xinhui Zhou @ 2024-07-16 6:09 UTC (permalink / raw) To: alsa-devel; +Cc: perex, tiwai, alsa-user 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, ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help on specifying 'chmap' in asound.conf 2024-07-16 6:09 ` Help on specifying 'chmap' in asound.conf Xinhui Zhou @ 2024-07-16 15:57 ` Takashi Iwai 2024-07-17 12:31 ` [Alsa-user] " Sergei Steshenko 0 siblings, 1 reply; 4+ messages in thread From: Takashi Iwai @ 2024-07-16 15:57 UTC (permalink / raw) To: Xinhui Zhou; +Cc: alsa-devel, perex, tiwai, alsa-user On Tue, 16 Jul 2024 08:09:21 +0200, Xinhui Zhou wrote: > > 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" 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Alsa-user] Help on specifying 'chmap' in asound.conf 2024-07-16 15:57 ` Takashi Iwai @ 2024-07-17 12:31 ` Sergei Steshenko 2024-07-19 13:53 ` Takashi Iwai 0 siblings, 1 reply; 4+ messages in thread From: Sergei Steshenko @ 2024-07-17 12:31 UTC (permalink / raw) To: Takashi Iwai, Xinhui Zhou; +Cc: alsa-user, alsa-devel, tiwai, perex 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. On 7/16/24 18:57, Takashi Iwai wrote: > On Tue, 16 Jul 2024 08:09:21 +0200, > Xinhui Zhou wrote: >> 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" > 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 > Alsa-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-user ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Alsa-user] Help on specifying 'chmap' in asound.conf 2024-07-17 12:31 ` [Alsa-user] " Sergei Steshenko @ 2024-07-19 13:53 ` Takashi Iwai 0 siblings, 0 replies; 4+ messages in thread From: Takashi Iwai @ 2024-07-19 13:53 UTC (permalink / raw) To: Sergei Steshenko; +Cc: Xinhui Zhou, alsa-user, alsa-devel, tiwai, perex On Wed, 17 Jul 2024 14:31:04 +0200, Sergei Steshenko wrote: > > 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. > 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 > > --Sergei. > > On 7/16/24 18:57, Takashi Iwai wrote: > > On Tue, 16 Jul 2024 08:09:21 +0200, > > Xinhui Zhou wrote: > >> 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" > > 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 > > Alsa-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/alsa-user ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-19 14:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.0.1673946668.16556.alsa-user@lists.sourceforge.net>
[not found] ` <0c99f6e0-c2f8-bc30-be10-314708382345@sc-riebe.de>
[not found] ` <c21f506a-255e-5885-7dde-f9716187536e@sc-riebe.de>
2024-07-16 6:09 ` Help on specifying 'chmap' in asound.conf Xinhui Zhou
2024-07-16 15:57 ` Takashi Iwai
2024-07-17 12:31 ` [Alsa-user] " Sergei Steshenko
2024-07-19 13:53 ` Takashi Iwai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox