* alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected @ 2020-06-02 17:57 Mukunda, Vijendar 2020-06-02 19:39 ` Jaroslav Kysela 0 siblings, 1 reply; 12+ messages in thread From: Mukunda, Vijendar @ 2020-06-02 17:57 UTC (permalink / raw) To: perex@perex.cz, alsa-devel@alsa-project.org; +Cc: Hui Wang We recently up streamed ACP PDM driver for Renoir APU. Our ACP IP has an internal PDM Decoder block where DMIC is directly connected. There are no KControls defined for PDM Driver. Our platform supports on board DMIC and South bridge Azalia (HD Audio ) endpoint . By default, DMIC endpoint is used as audio input device. When Headset Mic jack connected, it's not switching to External Mic. How does audio endpoint will switch in gnome when external mic is connected? From our understanding, UCM conf file for HDA driver is also required for configuring mixer controls for HD Audio capture device. Similarly when External Mic is removed , it has to switch to internal dmic . Need help in resolving this issue. Thanks, Vijendar ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-02 17:57 alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected Mukunda, Vijendar @ 2020-06-02 19:39 ` Jaroslav Kysela 2020-06-03 0:36 ` Hui Wang 0 siblings, 1 reply; 12+ messages in thread From: Jaroslav Kysela @ 2020-06-02 19:39 UTC (permalink / raw) To: Mukunda, Vijendar, alsa-devel@alsa-project.org; +Cc: Hui Wang Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): > We recently up streamed ACP PDM driver for Renoir APU. > > Our ACP IP has an internal PDM Decoder block where DMIC is directly connected. > There are no KControls defined for PDM Driver. > > Our platform supports on board DMIC and South bridge Azalia (HD Audio ) endpoint . > By default, DMIC endpoint is used as audio input device. > When Headset Mic jack connected, it's not switching to External Mic. Make sure that the Headset Mic priority port in pulseaudio is is greater than the one for DMIC. > How does audio endpoint will switch in gnome when external mic is connected? >>From our understanding, UCM conf file for HDA driver is also required for > configuring mixer controls for HD Audio capture device. > Similarly when External Mic is removed , it has to switch to internal dmic . An configuration example for UCM (DMIC connected to DSP, HDA codec for rest): https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp If you need a help to create a new configuration for your hardware, show the output from the alsa-info.sh script, please. Jaroslav > > Need help in resolving this issue. > > Thanks, > Vijendar > > -- Jaroslav Kysela <perex@perex.cz> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-02 19:39 ` Jaroslav Kysela @ 2020-06-03 0:36 ` Hui Wang 2020-06-03 9:34 ` Takashi Iwai 0 siblings, 1 reply; 12+ messages in thread From: Hui Wang @ 2020-06-03 0:36 UTC (permalink / raw) To: Jaroslav Kysela, Mukunda, Vijendar, alsa-devel@alsa-project.org On 2020/6/3 上午3:39, Jaroslav Kysela wrote: > Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): >> We recently up streamed ACP PDM driver for Renoir APU. >> >> Our ACP IP has an internal PDM Decoder block where DMIC is directly >> connected. >> There are no KControls defined for PDM Driver. >> >> Our platform supports on board DMIC and South bridge Azalia (HD Audio >> ) endpoint . >> By default, DMIC endpoint is used as audio input device. >> When Headset Mic jack connected, it's not switching to External Mic. > > Make sure that the Headset Mic priority port in pulseaudio is is > greater than the one for DMIC. > >> How does audio endpoint will switch in gnome when external mic is >> connected? >>> From our understanding, UCM conf file for HDA driver is also >>> required for >> configuring mixer controls for HD Audio capture device. >> Similarly when External Mic is removed , it has to switch to internal >> dmic . > > An configuration example for UCM (DMIC connected to DSP, HDA codec for > rest): > > https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp > > If you need a help to create a new configuration for your hardware, > show the output from the alsa-info.sh script, please. > > Jaroslav This audio design is a bit different from sof-hda-dsp, the dmic is on a standalone sound card. Please see the alsa-info.txt: https://pastebin.ubuntu.com/p/4kprhDZYbg/ Thanks, Hui. > >> >> Need help in resolving this issue. >> >> Thanks, >> Vijendar >> >> > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 0:36 ` Hui Wang @ 2020-06-03 9:34 ` Takashi Iwai 2020-06-03 10:32 ` Mukunda, Vijendar 2020-06-03 11:05 ` Jaroslav Kysela 0 siblings, 2 replies; 12+ messages in thread From: Takashi Iwai @ 2020-06-03 9:34 UTC (permalink / raw) To: Hui Wang; +Cc: alsa-devel@alsa-project.org, Mukunda, Vijendar On Wed, 03 Jun 2020 02:36:25 +0200, Hui Wang wrote: > > > On 2020/6/3 上午3:39, Jaroslav Kysela wrote: > > Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): > >> We recently up streamed ACP PDM driver for Renoir APU. > >> > >> Our ACP IP has an internal PDM Decoder block where DMIC is directly > >> connected. > >> There are no KControls defined for PDM Driver. > >> > >> Our platform supports on board DMIC and South bridge Azalia (HD > >> Audio ) endpoint . > >> By default, DMIC endpoint is used as audio input device. > >> When Headset Mic jack connected, it's not switching to External Mic. > > > > Make sure that the Headset Mic priority port in pulseaudio is is > > greater than the one for DMIC. > > > >> How does audio endpoint will switch in gnome when external mic is > >> connected? > >>> From our understanding, UCM conf file for HDA driver is also > >>> required for > >> configuring mixer controls for HD Audio capture device. > >> Similarly when External Mic is removed , it has to switch to > >> internal dmic . > > > > An configuration example for UCM (DMIC connected to DSP, HDA codec > > for rest): > > > > https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp > > > > If you need a help to create a new configuration for your hardware, > > show the output from the alsa-info.sh script, please. > > > > Jaroslav > > This audio design is a bit different from sof-hda-dsp, the dmic is on > a standalone sound card. Please see the alsa-info.txt: > > https://pastebin.ubuntu.com/p/4kprhDZYbg/ And that's an interesting case. Can we manage multiple cards in a single UCM profile? Takashi ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 9:34 ` Takashi Iwai @ 2020-06-03 10:32 ` Mukunda, Vijendar 2020-06-03 10:35 ` Takashi Iwai 2020-06-03 11:05 ` Jaroslav Kysela 2020-06-03 11:05 ` Jaroslav Kysela 1 sibling, 2 replies; 12+ messages in thread From: Mukunda, Vijendar @ 2020-06-03 10:32 UTC (permalink / raw) To: Takashi Iwai, Hui Wang; +Cc: alsa-devel@alsa-project.org > -----Original Message----- > From: Takashi Iwai <tiwai@suse.de> > Sent: Wednesday, June 3, 2020 3:05 PM > To: Hui Wang <hui.wang@canonical.com> > Cc: Jaroslav Kysela <perex@perex.cz>; Mukunda, Vijendar > <Vijendar.Mukunda@amd.com>; alsa-devel@alsa-project.org > Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when > external mic connected > > On Wed, 03 Jun 2020 02:36:25 +0200, > Hui Wang wrote: > > > > > > On 2020/6/3 上午3:39, Jaroslav Kysela wrote: > > > Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): > > >> We recently up streamed ACP PDM driver for Renoir APU. > > >> > > >> Our ACP IP has an internal PDM Decoder block where DMIC is directly > > >> connected. > > >> There are no KControls defined for PDM Driver. > > >> > > >> Our platform supports on board DMIC and South bridge Azalia (HD > > >> Audio ) endpoint . > > >> By default, DMIC endpoint is used as audio input device. > > >> When Headset Mic jack connected, it's not switching to External Mic. > > > > > > Make sure that the Headset Mic priority port in pulseaudio is is > > > greater than the one for DMIC. > > > > > >> How does audio endpoint will switch in gnome when external mic is > > >> connected? > > >>> From our understanding, UCM conf file for HDA driver is also > > >>> required for > > >> configuring mixer controls for HD Audio capture device. > > >> Similarly when External Mic is removed , it has to switch to > > >> internal dmic . > > > > > > An configuration example for UCM (DMIC connected to DSP, HDA codec > > > for rest): > > > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub > .com%2Falsa-project%2Falsa-ucm-conf%2Ftree%2Fmaster%2Fucm2%2Fsof- > hda- > dsp&data=02%7C01%7CVijendar.Mukunda%40amd.com%7C5fbb3a516d5 > 24c73568d08d807a157a1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C > 0%7C637267736827671946&sdata=0aO7dbLATuW%2BIeJsjWoWCGOaYEO > WQaVwI9izppB3v7k%3D&reserved=0 > > > > > > If you need a help to create a new configuration for your hardware, > > > show the output from the alsa-info.sh script, please. > > > > > > Jaroslav > > > > This audio design is a bit different from sof-hda-dsp, the dmic is on > > a standalone sound card. Please see the alsa-info.txt: > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteb > in.ubuntu.com%2Fp%2F4kprhDZYbg%2F&data=02%7C01%7CVijendar.Mu > kunda%40amd.com%7C5fbb3a516d524c73568d08d807a157a1%7C3dd8961fe4 > 884e608e11a82d994e183d%7C0%7C0%7C637267736827671946&sdata=Q > 50xNbF1KSqasNa0UyKzUFAzOc9KPIguBjgYHr1XSbg%3D&reserved=0 > > And that's an interesting case. Can we manage multiple cards in a > single UCM profile? > > > Takashi I am not much familiar with UCM files creation. As per my understanding, UCM entries will program the mixer controls depending up on the use case and selected device. But for PDM sound card there are no mixer controls defined. Do we still need to add UCM entries for PDM sound card along with UCM entries for HD Audio sound card ? For example mentioning the pcm device for PDM sound card, even we don't program any specific kcontrols ? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 10:32 ` Mukunda, Vijendar @ 2020-06-03 10:35 ` Takashi Iwai 2020-06-03 10:58 ` Mukunda, Vijendar 2020-06-03 11:05 ` Jaroslav Kysela 1 sibling, 1 reply; 12+ messages in thread From: Takashi Iwai @ 2020-06-03 10:35 UTC (permalink / raw) To: Mukunda, Vijendar; +Cc: Hui Wang, alsa-devel@alsa-project.org On Wed, 03 Jun 2020 12:32:41 +0200, Mukunda, Vijendar wrote: > > > > > -----Original Message----- > > From: Takashi Iwai <tiwai@suse.de> > > Sent: Wednesday, June 3, 2020 3:05 PM > > To: Hui Wang <hui.wang@canonical.com> > > Cc: Jaroslav Kysela <perex@perex.cz>; Mukunda, Vijendar > > <Vijendar.Mukunda@amd.com>; alsa-devel@alsa-project.org > > Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when > > external mic connected > > > > On Wed, 03 Jun 2020 02:36:25 +0200, > > Hui Wang wrote: > > > > > > > > > On 2020/6/3 上午3:39, Jaroslav Kysela wrote: > > > > Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): > > > >> We recently up streamed ACP PDM driver for Renoir APU. > > > >> > > > >> Our ACP IP has an internal PDM Decoder block where DMIC is directly > > > >> connected. > > > >> There are no KControls defined for PDM Driver. > > > >> > > > >> Our platform supports on board DMIC and South bridge Azalia (HD > > > >> Audio ) endpoint . > > > >> By default, DMIC endpoint is used as audio input device. > > > >> When Headset Mic jack connected, it's not switching to External Mic. > > > > > > > > Make sure that the Headset Mic priority port in pulseaudio is is > > > > greater than the one for DMIC. > > > > > > > >> How does audio endpoint will switch in gnome when external mic is > > > >> connected? > > > >>> From our understanding, UCM conf file for HDA driver is also > > > >>> required for > > > >> configuring mixer controls for HD Audio capture device. > > > >> Similarly when External Mic is removed , it has to switch to > > > >> internal dmic . > > > > > > > > An configuration example for UCM (DMIC connected to DSP, HDA codec > > > > for rest): > > > > > > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub > > .com%2Falsa-project%2Falsa-ucm-conf%2Ftree%2Fmaster%2Fucm2%2Fsof- > > hda- > > dsp&data=02%7C01%7CVijendar.Mukunda%40amd.com%7C5fbb3a516d5 > > 24c73568d08d807a157a1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C > > 0%7C637267736827671946&sdata=0aO7dbLATuW%2BIeJsjWoWCGOaYEO > > WQaVwI9izppB3v7k%3D&reserved=0 > > > > > > > > If you need a help to create a new configuration for your hardware, > > > > show the output from the alsa-info.sh script, please. > > > > > > > > Jaroslav > > > > > > This audio design is a bit different from sof-hda-dsp, the dmic is on > > > a standalone sound card. Please see the alsa-info.txt: > > > > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteb > > in.ubuntu.com%2Fp%2F4kprhDZYbg%2F&data=02%7C01%7CVijendar.Mu > > kunda%40amd.com%7C5fbb3a516d524c73568d08d807a157a1%7C3dd8961fe4 > > 884e608e11a82d994e183d%7C0%7C0%7C637267736827671946&sdata=Q > > 50xNbF1KSqasNa0UyKzUFAzOc9KPIguBjgYHr1XSbg%3D&reserved=0 > > > > And that's an interesting case. Can we manage multiple cards in a > > single UCM profile? > > > > > > Takashi > > I am not much familiar with UCM files creation. > As per my understanding, UCM entries will program the mixer controls > depending up on the use case and selected device. UCM is more than that. It manages which PCM device is chosen, which jack control corresponds, etc, too. Takashi ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 10:35 ` Takashi Iwai @ 2020-06-03 10:58 ` Mukunda, Vijendar 2020-06-03 12:58 ` Jaroslav Kysela 0 siblings, 1 reply; 12+ messages in thread From: Mukunda, Vijendar @ 2020-06-03 10:58 UTC (permalink / raw) To: Takashi Iwai; +Cc: Hui Wang, alsa-devel@alsa-project.org > -----Original Message----- > From: Takashi Iwai <tiwai@suse.de> > Sent: Wednesday, June 3, 2020 4:06 PM > To: Mukunda, Vijendar <Vijendar.Mukunda@amd.com> > Cc: Hui Wang <hui.wang@canonical.com>; Jaroslav Kysela <perex@perex.cz>; > alsa-devel@alsa-project.org > Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when > external mic connected > > On Wed, 03 Jun 2020 12:32:41 +0200, > Mukunda, Vijendar wrote: > > > > > > > > > -----Original Message----- > > > From: Takashi Iwai <tiwai@suse.de> > > > Sent: Wednesday, June 3, 2020 3:05 PM > > > To: Hui Wang <hui.wang@canonical.com> > > > Cc: Jaroslav Kysela <perex@perex.cz>; Mukunda, Vijendar > > > <Vijendar.Mukunda@amd.com>; alsa-devel@alsa-project.org > > > Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when > > > external mic connected > > > > > > On Wed, 03 Jun 2020 02:36:25 +0200, > > > Hui Wang wrote: > > > > > > > > > > > > On 2020/6/3 上午3:39, Jaroslav Kysela wrote: > > > > > Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): > > > > >> We recently up streamed ACP PDM driver for Renoir APU. > > > > >> > > > > >> Our ACP IP has an internal PDM Decoder block where DMIC is directly > > > > >> connected. > > > > >> There are no KControls defined for PDM Driver. > > > > >> > > > > >> Our platform supports on board DMIC and South bridge Azalia (HD > > > > >> Audio ) endpoint . > > > > >> By default, DMIC endpoint is used as audio input device. > > > > >> When Headset Mic jack connected, it's not switching to External Mic. > > > > > > > > > > Make sure that the Headset Mic priority port in pulseaudio is is > > > > > greater than the one for DMIC. > > > > > > > > > >> How does audio endpoint will switch in gnome when external mic is > > > > >> connected? > > > > >>> From our understanding, UCM conf file for HDA driver is also > > > > >>> required for > > > > >> configuring mixer controls for HD Audio capture device. > > > > >> Similarly when External Mic is removed , it has to switch to > > > > >> internal dmic . > > > > > > > > > > An configuration example for UCM (DMIC connected to DSP, HDA codec > > > > > for rest): > > > > > > > > > > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub > > > .com%2Falsa-project%2Falsa-ucm-conf%2Ftree%2Fmaster%2Fucm2%2Fsof- > > > hda- > > > > dsp&data=02%7C01%7CVijendar.Mukunda%40amd.com%7C5fbb3a516d5 > > > > 24c73568d08d807a157a1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C > > > > 0%7C637267736827671946&sdata=0aO7dbLATuW%2BIeJsjWoWCGOaYEO > > > WQaVwI9izppB3v7k%3D&reserved=0 > > > > > > > > > > If you need a help to create a new configuration for your hardware, > > > > > show the output from the alsa-info.sh script, please. > > > > > > > > > > Jaroslav > > > > > > > > This audio design is a bit different from sof-hda-dsp, the dmic is on > > > > a standalone sound card. Please see the alsa-info.txt: > > > > > > > > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteb > > > > in.ubuntu.com%2Fp%2F4kprhDZYbg%2F&data=02%7C01%7CVijendar.Mu > > > > kunda%40amd.com%7C5fbb3a516d524c73568d08d807a157a1%7C3dd8961fe4 > > > > 884e608e11a82d994e183d%7C0%7C0%7C637267736827671946&sdata=Q > > > 50xNbF1KSqasNa0UyKzUFAzOc9KPIguBjgYHr1XSbg%3D&reserved=0 > > > > > > And that's an interesting case. Can we manage multiple cards in a > > > single UCM profile? > > > > > > > > > Takashi > > > > I am not much familiar with UCM files creation. > > As per my understanding, UCM entries will program the mixer controls > > depending up on the use case and selected device. > > UCM is more than that. It manages which PCM device is chosen, which > jack control corresponds, etc, too. > > > Takashi Got it. Could you help us to get the UCM file which will work for both sound cards for our platform. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 10:58 ` Mukunda, Vijendar @ 2020-06-03 12:58 ` Jaroslav Kysela 2020-06-04 4:54 ` Mukunda, Vijendar 0 siblings, 1 reply; 12+ messages in thread From: Jaroslav Kysela @ 2020-06-03 12:58 UTC (permalink / raw) To: Mukunda, Vijendar, Takashi Iwai; +Cc: Hui Wang, alsa-devel@alsa-project.org Dne 03. 06. 20 v 12:58 Mukunda, Vijendar napsal(a): > > >> -----Original Message----- >> From: Takashi Iwai <tiwai@suse.de> >> Sent: Wednesday, June 3, 2020 4:06 PM >> To: Mukunda, Vijendar <Vijendar.Mukunda@amd.com> >> Cc: Hui Wang <hui.wang@canonical.com>; Jaroslav Kysela <perex@perex.cz>; >> alsa-devel@alsa-project.org >> Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when >> external mic connected >> >> On Wed, 03 Jun 2020 12:32:41 +0200, >> Mukunda, Vijendar wrote: >>> >>> >>> >>>> -----Original Message----- >>>> From: Takashi Iwai <tiwai@suse.de> >>>> Sent: Wednesday, June 3, 2020 3:05 PM >>>> To: Hui Wang <hui.wang@canonical.com> >>>> Cc: Jaroslav Kysela <perex@perex.cz>; Mukunda, Vijendar >>>> <Vijendar.Mukunda@amd.com>; alsa-devel@alsa-project.org >>>> Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when >>>> external mic connected >>>> >>>> On Wed, 03 Jun 2020 02:36:25 +0200, >>>> Hui Wang wrote: >>>>> >>>>> >>>>> On 2020/6/3 上午3:39, Jaroslav Kysela wrote: >>>>>> Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): >>>>>>> We recently up streamed ACP PDM driver for Renoir APU. >>>>>>> >>>>>>> Our ACP IP has an internal PDM Decoder block where DMIC is directly >>>>>>> connected. >>>>>>> There are no KControls defined for PDM Driver. >>>>>>> >>>>>>> Our platform supports on board DMIC and South bridge Azalia (HD >>>>>>> Audio ) endpoint . >>>>>>> By default, DMIC endpoint is used as audio input device. >>>>>>> When Headset Mic jack connected, it's not switching to External Mic. >>>>>> >>>>>> Make sure that the Headset Mic priority port in pulseaudio is is >>>>>> greater than the one for DMIC. >>>>>> >>>>>>> How does audio endpoint will switch in gnome when external mic is >>>>>>> connected? >>>>>>>> From our understanding, UCM conf file for HDA driver is also >>>>>>>> required for >>>>>>> configuring mixer controls for HD Audio capture device. >>>>>>> Similarly when External Mic is removed , it has to switch to >>>>>>> internal dmic . >>>>>> >>>>>> An configuration example for UCM (DMIC connected to DSP, HDA codec >>>>>> for rest): >>>>>> >>>>>> >>>> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub >>>> .com%2Falsa-project%2Falsa-ucm-conf%2Ftree%2Fmaster%2Fucm2%2Fsof- >>>> hda- >>>> >> dsp&data=02%7C01%7CVijendar.Mukunda%40amd.com%7C5fbb3a516d5 >>>> >> 24c73568d08d807a157a1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C >>>> >> 0%7C637267736827671946&sdata=0aO7dbLATuW%2BIeJsjWoWCGOaYEO >>>> WQaVwI9izppB3v7k%3D&reserved=0 >>>>>> >>>>>> If you need a help to create a new configuration for your hardware, >>>>>> show the output from the alsa-info.sh script, please. >>>>>> >>>>>> Jaroslav >>>>> >>>>> This audio design is a bit different from sof-hda-dsp, the dmic is on >>>>> a standalone sound card. Please see the alsa-info.txt: >>>>> >>>>> >>>> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteb >>>> >> in.ubuntu.com%2Fp%2F4kprhDZYbg%2F&data=02%7C01%7CVijendar.Mu >>>> >> kunda%40amd.com%7C5fbb3a516d524c73568d08d807a157a1%7C3dd8961fe4 >>>> >> 884e608e11a82d994e183d%7C0%7C0%7C637267736827671946&sdata=Q >>>> 50xNbF1KSqasNa0UyKzUFAzOc9KPIguBjgYHr1XSbg%3D&reserved=0 >>>> >>>> And that's an interesting case. Can we manage multiple cards in a >>>> single UCM profile? >>>> >>>> >>>> Takashi >>> >>> I am not much familiar with UCM files creation. >>> As per my understanding, UCM entries will program the mixer controls >>> depending up on the use case and selected device. >> >> UCM is more than that. It manages which PCM device is chosen, which >> jack control corresponds, etc, too. >> >> >> Takashi > > Got it. Could you help us to get the UCM file which will work for both sound cards for our platform. Please, create a new issue with the mentioned alsa-info URL at github: https://github.com/alsa-project/alsa-ucm-conf/issues I'll give a look when my time permits. Jaroslav -- Jaroslav Kysela <perex@perex.cz> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 12:58 ` Jaroslav Kysela @ 2020-06-04 4:54 ` Mukunda, Vijendar 0 siblings, 0 replies; 12+ messages in thread From: Mukunda, Vijendar @ 2020-06-04 4:54 UTC (permalink / raw) To: Jaroslav Kysela, Takashi Iwai; +Cc: Hui Wang, alsa-devel@alsa-project.org > -----Original Message----- > From: Jaroslav Kysela <perex@perex.cz> > Sent: Wednesday, June 3, 2020 6:28 PM > To: Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; Takashi Iwai > <tiwai@suse.de> > Cc: Hui Wang <hui.wang@canonical.com>; alsa-devel@alsa-project.org > Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when > external mic connected > > Dne 03. 06. 20 v 12:58 Mukunda, Vijendar napsal(a): > > > > > >> -----Original Message----- > >> From: Takashi Iwai <tiwai@suse.de> > >> Sent: Wednesday, June 3, 2020 4:06 PM > >> To: Mukunda, Vijendar <Vijendar.Mukunda@amd.com> > >> Cc: Hui Wang <hui.wang@canonical.com>; Jaroslav Kysela > <perex@perex.cz>; > >> alsa-devel@alsa-project.org > >> Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when > >> external mic connected > >> > >> On Wed, 03 Jun 2020 12:32:41 +0200, > >> Mukunda, Vijendar wrote: > >>> > >>> > >>> > >>>> -----Original Message----- > >>>> From: Takashi Iwai <tiwai@suse.de> > >>>> Sent: Wednesday, June 3, 2020 3:05 PM > >>>> To: Hui Wang <hui.wang@canonical.com> > >>>> Cc: Jaroslav Kysela <perex@perex.cz>; Mukunda, Vijendar > >>>> <Vijendar.Mukunda@amd.com>; alsa-devel@alsa-project.org > >>>> Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when > >>>> external mic connected > >>>> > >>>> On Wed, 03 Jun 2020 02:36:25 +0200, > >>>> Hui Wang wrote: > >>>>> > >>>>> > >>>>> On 2020/6/3 上午3:39, Jaroslav Kysela wrote: > >>>>>> Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): > >>>>>>> We recently up streamed ACP PDM driver for Renoir APU. > >>>>>>> > >>>>>>> Our ACP IP has an internal PDM Decoder block where DMIC is directly > >>>>>>> connected. > >>>>>>> There are no KControls defined for PDM Driver. > >>>>>>> > >>>>>>> Our platform supports on board DMIC and South bridge Azalia (HD > >>>>>>> Audio ) endpoint . > >>>>>>> By default, DMIC endpoint is used as audio input device. > >>>>>>> When Headset Mic jack connected, it's not switching to External Mic. > >>>>>> > >>>>>> Make sure that the Headset Mic priority port in pulseaudio is is > >>>>>> greater than the one for DMIC. > >>>>>> > >>>>>>> How does audio endpoint will switch in gnome when external mic is > >>>>>>> connected? > >>>>>>>> From our understanding, UCM conf file for HDA driver is also > >>>>>>>> required for > >>>>>>> configuring mixer controls for HD Audio capture device. > >>>>>>> Similarly when External Mic is removed , it has to switch to > >>>>>>> internal dmic . > >>>>>> > >>>>>> An configuration example for UCM (DMIC connected to DSP, HDA > codec > >>>>>> for rest): > >>>>>> > >>>>>> > >>>> > >> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub > >>>> .com%2Falsa-project%2Falsa-ucm- > conf%2Ftree%2Fmaster%2Fucm2%2Fsof- > >>>> hda- > >>>> > >> > dsp&data=02%7C01%7CVijendar.Mukunda%40amd.com%7C5fbb3a516d5 > >>>> > >> > 24c73568d08d807a157a1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C > >>>> > >> > 0%7C637267736827671946&sdata=0aO7dbLATuW%2BIeJsjWoWCGOaYEO > >>>> WQaVwI9izppB3v7k%3D&reserved=0 > >>>>>> > >>>>>> If you need a help to create a new configuration for your hardware, > >>>>>> show the output from the alsa-info.sh script, please. > >>>>>> > >>>>>> Jaroslav > >>>>> > >>>>> This audio design is a bit different from sof-hda-dsp, the dmic is on > >>>>> a standalone sound card. Please see the alsa-info.txt: > >>>>> > >>>>> > >>>> > >> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteb > >>>> > >> > in.ubuntu.com%2Fp%2F4kprhDZYbg%2F&data=02%7C01%7CVijendar.Mu > >>>> > >> > kunda%40amd.com%7C5fbb3a516d524c73568d08d807a157a1%7C3dd8961fe4 > >>>> > >> > 884e608e11a82d994e183d%7C0%7C0%7C637267736827671946&sdata=Q > >>>> 50xNbF1KSqasNa0UyKzUFAzOc9KPIguBjgYHr1XSbg%3D&reserved=0 > >>>> > >>>> And that's an interesting case. Can we manage multiple cards in a > >>>> single UCM profile? > >>>> > >>>> > >>>> Takashi > >>> > >>> I am not much familiar with UCM files creation. > >>> As per my understanding, UCM entries will program the mixer controls > >>> depending up on the use case and selected device. > >> > >> UCM is more than that. It manages which PCM device is chosen, which > >> jack control corresponds, etc, too. > >> > >> > >> Takashi > > > > Got it. Could you help us to get the UCM file which will work for both sound > cards for our platform. > > Please, create a new issue with the mentioned alsa-info URL at github: > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub > .com%2Falsa-project%2Falsa-ucm- > conf%2Fissues&data=02%7C01%7CVijendar.Mukunda%40amd.com%7Ca9 > 7a3829c6f644f72b8008d807bdcd7f%7C3dd8961fe4884e608e11a82d994e183d > %7C0%7C0%7C637267859073441689&sdata=HQlUPdDrpBwDzl%2FsgXPse > hMvxUi4j2tEWqpn3bkV8i8%3D&reserved=0 > > I'll give a look when my time permits. > > Jaroslav > > -- > Jaroslav Kysela <perex@perex.cz> > Linux Sound Maintainer; ALSA Project; Red Hat, Inc. Created ticket for the same in git hub. Below is the link. https://github.com/alsa-project/alsa-ucm-conf/issues/30 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 10:32 ` Mukunda, Vijendar 2020-06-03 10:35 ` Takashi Iwai @ 2020-06-03 11:05 ` Jaroslav Kysela 1 sibling, 0 replies; 12+ messages in thread From: Jaroslav Kysela @ 2020-06-03 11:05 UTC (permalink / raw) To: Mukunda, Vijendar, Takashi Iwai, Hui Wang; +Cc: alsa-devel@alsa-project.org Dne 03. 06. 20 v 12:32 Mukunda, Vijendar napsal(a): > > >> -----Original Message----- >> From: Takashi Iwai <tiwai@suse.de> >> Sent: Wednesday, June 3, 2020 3:05 PM >> To: Hui Wang <hui.wang@canonical.com> >> Cc: Jaroslav Kysela <perex@perex.cz>; Mukunda, Vijendar >> <Vijendar.Mukunda@amd.com>; alsa-devel@alsa-project.org >> Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when >> external mic connected >> >> On Wed, 03 Jun 2020 02:36:25 +0200, >> Hui Wang wrote: >>> >>> >>> On 2020/6/3 上午3:39, Jaroslav Kysela wrote: >>>> Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): >>>>> We recently up streamed ACP PDM driver for Renoir APU. >>>>> >>>>> Our ACP IP has an internal PDM Decoder block where DMIC is directly >>>>> connected. >>>>> There are no KControls defined for PDM Driver. >>>>> >>>>> Our platform supports on board DMIC and South bridge Azalia (HD >>>>> Audio ) endpoint . >>>>> By default, DMIC endpoint is used as audio input device. >>>>> When Headset Mic jack connected, it's not switching to External Mic. >>>> >>>> Make sure that the Headset Mic priority port in pulseaudio is is >>>> greater than the one for DMIC. >>>> >>>>> How does audio endpoint will switch in gnome when external mic is >>>>> connected? >>>>>> From our understanding, UCM conf file for HDA driver is also >>>>>> required for >>>>> configuring mixer controls for HD Audio capture device. >>>>> Similarly when External Mic is removed , it has to switch to >>>>> internal dmic . >>>> >>>> An configuration example for UCM (DMIC connected to DSP, HDA codec >>>> for rest): >>>> >>>> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub >> .com%2Falsa-project%2Falsa-ucm-conf%2Ftree%2Fmaster%2Fucm2%2Fsof- >> hda- >> dsp&data=02%7C01%7CVijendar.Mukunda%40amd.com%7C5fbb3a516d5 >> 24c73568d08d807a157a1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C >> 0%7C637267736827671946&sdata=0aO7dbLATuW%2BIeJsjWoWCGOaYEO >> WQaVwI9izppB3v7k%3D&reserved=0 >>>> >>>> If you need a help to create a new configuration for your hardware, >>>> show the output from the alsa-info.sh script, please. >>>> >>>> Jaroslav >>> >>> This audio design is a bit different from sof-hda-dsp, the dmic is on >>> a standalone sound card. Please see the alsa-info.txt: >>> >>> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteb >> in.ubuntu.com%2Fp%2F4kprhDZYbg%2F&data=02%7C01%7CVijendar.Mu >> kunda%40amd.com%7C5fbb3a516d524c73568d08d807a157a1%7C3dd8961fe4 >> 884e608e11a82d994e183d%7C0%7C0%7C637267736827671946&sdata=Q >> 50xNbF1KSqasNa0UyKzUFAzOc9KPIguBjgYHr1XSbg%3D&reserved=0 >> >> And that's an interesting case. Can we manage multiple cards in a >> single UCM profile? >> >> >> Takashi > > I am not much familiar with UCM files creation. > As per my understanding, UCM entries will program the mixer controls > depending up on the use case and selected device. > > But for PDM sound card there are no mixer controls defined. > Do we still need to add UCM entries for PDM sound card along with UCM entries for > HD Audio sound card ? > For example mentioning the pcm device for PDM sound card, > even we don't program any specific kcontrols ? UCM describes the verbs (profiles), devices (ports in PA) in verbs and the enable/disable/transition settings. So it's not only about the kcontrols. Basically, for your case, you need to configure pulseaudio correctly for the legacy probe ALSA soundcard mechanism (priorities). PA should switch to the profile/port with the highest priority when available. There is also some gnome code which handles the shared mic/headset mic inputs where the hardware cannot detect the connected device (it may not work for your case correctly). Or, you may create one UCM verb with the devices from multiple ALSA soundcards (and the PA will handle this in the one profile like one legacy soundcard). Jaroslav -- Jaroslav Kysela <perex@perex.cz> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 9:34 ` Takashi Iwai 2020-06-03 10:32 ` Mukunda, Vijendar @ 2020-06-03 11:05 ` Jaroslav Kysela 2020-06-03 11:15 ` Takashi Iwai 1 sibling, 1 reply; 12+ messages in thread From: Jaroslav Kysela @ 2020-06-03 11:05 UTC (permalink / raw) To: Takashi Iwai, Hui Wang; +Cc: alsa-devel@alsa-project.org, Mukunda, Vijendar Dne 03. 06. 20 v 11:34 Takashi Iwai napsal(a): > On Wed, 03 Jun 2020 02:36:25 +0200, > Hui Wang wrote: >> >> >> On 2020/6/3 上午3:39, Jaroslav Kysela wrote: >>> Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): >>>> We recently up streamed ACP PDM driver for Renoir APU. >>>> >>>> Our ACP IP has an internal PDM Decoder block where DMIC is directly >>>> connected. >>>> There are no KControls defined for PDM Driver. >>>> >>>> Our platform supports on board DMIC and South bridge Azalia (HD >>>> Audio ) endpoint . >>>> By default, DMIC endpoint is used as audio input device. >>>> When Headset Mic jack connected, it's not switching to External Mic. >>> >>> Make sure that the Headset Mic priority port in pulseaudio is is >>> greater than the one for DMIC. >>> >>>> How does audio endpoint will switch in gnome when external mic is >>>> connected? >>>>> From our understanding, UCM conf file for HDA driver is also >>>>> required for >>>> configuring mixer controls for HD Audio capture device. >>>> Similarly when External Mic is removed , it has to switch to >>>> internal dmic . >>> >>> An configuration example for UCM (DMIC connected to DSP, HDA codec >>> for rest): >>> >>> https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp >>> >>> If you need a help to create a new configuration for your hardware, >>> show the output from the alsa-info.sh script, please. >>> >>> Jaroslav >> >> This audio design is a bit different from sof-hda-dsp, the dmic is on >> a standalone sound card. Please see the alsa-info.txt: >> >> https://pastebin.ubuntu.com/p/4kprhDZYbg/ > > And that's an interesting case. Can we manage multiple cards in a > single UCM profile? Yes, it should work, but we need to extend pulseaudio to avoid fallback to the legacy ALSA profile when the "slave" soundcard is enumerated. PA should skip this card. We need to check if the empty UCM verb is supported. Also, UCM has ${CardId} substitution (for the master card config), but we need to address the slave, too. Perhaps, we should add something like ${GetCardIdByName:STRING[:INDEX]} where STRING may be the name of the soundcard (it will be 'acp') in this case. The INDEX may refer to multiple instances (INDEX = 0 first soundcard found). Jaroslav > > > Takashi > -- Jaroslav Kysela <perex@perex.cz> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected 2020-06-03 11:05 ` Jaroslav Kysela @ 2020-06-03 11:15 ` Takashi Iwai 0 siblings, 0 replies; 12+ messages in thread From: Takashi Iwai @ 2020-06-03 11:15 UTC (permalink / raw) To: Jaroslav Kysela; +Cc: Hui Wang, alsa-devel@alsa-project.org, Mukunda, Vijendar On Wed, 03 Jun 2020 13:05:43 +0200, Jaroslav Kysela wrote: > > Dne 03. 06. 20 v 11:34 Takashi Iwai napsal(a): > > On Wed, 03 Jun 2020 02:36:25 +0200, > > Hui Wang wrote: > >> > >> > >> On 2020/6/3 上午3:39, Jaroslav Kysela wrote: > >>> Dne 02. 06. 20 v 19:57 Mukunda, Vijendar napsal(a): > >>>> We recently up streamed ACP PDM driver for Renoir APU. > >>>> > >>>> Our ACP IP has an internal PDM Decoder block where DMIC is directly > >>>> connected. > >>>> There are no KControls defined for PDM Driver. > >>>> > >>>> Our platform supports on board DMIC and South bridge Azalia (HD > >>>> Audio ) endpoint . > >>>> By default, DMIC endpoint is used as audio input device. > >>>> When Headset Mic jack connected, it's not switching to External Mic. > >>> > >>> Make sure that the Headset Mic priority port in pulseaudio is is > >>> greater than the one for DMIC. > >>> > >>>> How does audio endpoint will switch in gnome when external mic is > >>>> connected? > >>>>> From our understanding, UCM conf file for HDA driver is also > >>>>> required for > >>>> configuring mixer controls for HD Audio capture device. > >>>> Similarly when External Mic is removed , it has to switch to > >>>> internal dmic . > >>> > >>> An configuration example for UCM (DMIC connected to DSP, HDA codec > >>> for rest): > >>> > >>> https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp > >>> > >>> If you need a help to create a new configuration for your hardware, > >>> show the output from the alsa-info.sh script, please. > >>> > >>> Jaroslav > >> > >> This audio design is a bit different from sof-hda-dsp, the dmic is on > >> a standalone sound card. Please see the alsa-info.txt: > >> > >> https://pastebin.ubuntu.com/p/4kprhDZYbg/ > > > > And that's an interesting case. Can we manage multiple cards in a > > single UCM profile? > > Yes, it should work, but we need to extend pulseaudio to avoid > fallback to the legacy ALSA profile when the "slave" soundcard is > enumerated. PA should skip this card. We need to check if the empty > UCM verb is supported. I suppose it's not only about PA, but in general we need to define how to deal with it. I can imagine to provide a UCM profile that is mapped to some dummy ops for the slave card, for example. > Also, UCM has ${CardId} substitution (for the master card config), but > we need to address the slave, too. Perhaps, we should add something > like ${GetCardIdByName:STRING[:INDEX]} where STRING may be the name of > the soundcard (it will be 'acp') in this case. The INDEX may refer to > multiple instances (INDEX = 0 first soundcard found). FWIW, I see a similar requirement for the recent change in USB-audio for Gigabyte Auros Master with AMD TRX40: it provides a front headphone output from a separate card while other I/Os are served by another card. It'd be handy if both can be combined. thanks, Takashi ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-06-04 4:55 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-06-02 17:57 alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected Mukunda, Vijendar 2020-06-02 19:39 ` Jaroslav Kysela 2020-06-03 0:36 ` Hui Wang 2020-06-03 9:34 ` Takashi Iwai 2020-06-03 10:32 ` Mukunda, Vijendar 2020-06-03 10:35 ` Takashi Iwai 2020-06-03 10:58 ` Mukunda, Vijendar 2020-06-03 12:58 ` Jaroslav Kysela 2020-06-04 4:54 ` Mukunda, Vijendar 2020-06-03 11:05 ` Jaroslav Kysela 2020-06-03 11:05 ` Jaroslav Kysela 2020-06-03 11:15 ` Takashi Iwai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox