From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 273B4C433E0 for ; Wed, 3 Jun 2020 11:16:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8FC820678 for ; Wed, 3 Jun 2020 11:16:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="hmn3tAqL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8FC820678 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 34F5A1607; Wed, 3 Jun 2020 13:15:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 34F5A1607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591183008; bh=dUWSQ2EUSRCDTSMbfAeS1VrLpKz+IU5jLqonaSGZ6gA=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hmn3tAqL6AjAaGkeClmLhnIUOuwptjfUXvhLN/0W7bHUDQTFrIadaaqh8vFUG0Lgu W02PZc+beSCPeC9ZCzNU/g7Y4+P1zNOHWpQdhj4ar4Z9Xt+96rC0GqEQ0NsIXTWbLq EDf9jzes1ArFfcRh7Ok/GVkc0K2gAkfF59JZLp+o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9F0E0F801EC; Wed, 3 Jun 2020 13:15:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2506CF801ED; Wed, 3 Jun 2020 13:15:56 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 61114F800D0 for ; Wed, 3 Jun 2020 13:15:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 61114F800D0 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1EE0DAC91; Wed, 3 Jun 2020 11:15:51 +0000 (UTC) Date: Wed, 03 Jun 2020 13:15:47 +0200 Message-ID: From: Takashi Iwai To: Jaroslav Kysela Subject: Re: alsa-project alsa-ucm : Audio endpoint is not switching when external mic connected In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Hui Wang , "alsa-devel@alsa-project.org" , "Mukunda, Vijendar" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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