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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 4C5F9C433DF for ; Wed, 3 Jun 2020 10:36:44 +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 CC72B20679 for ; Wed, 3 Jun 2020 10:36:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="WSeknbBq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC72B20679 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 614941655; Wed, 3 Jun 2020 12:35:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 614941655 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591180602; bh=ZbBdPDLpa5dra1BRNDBfelYgdyAHii+CZErFZ+MSfjw=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WSeknbBq23H9nQ92GsFHcRqaDCji95WrW/v39m5/GvRXsmxmRH3dc12aoSXhLaZBE S9ZhRUMLmqdAyhXQgQ2gBzokWA/3kvXPD2Oz1a0Ww0mn1m6++8KHdHR2tuIUXyBAUD R35uH9SRR6cACX2b5mmOkf6niVSDFAiN/WxPPhLI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id ECD0DF800D0; Wed, 3 Jun 2020 12:35:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 97489F801ED; Wed, 3 Jun 2020 12:35:50 +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 75FB7F800D0 for ; Wed, 3 Jun 2020 12:35:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75FB7F800D0 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 E706CB18D; Wed, 3 Jun 2020 10:35:44 +0000 (UTC) Date: Wed, 03 Jun 2020 12:35:41 +0200 Message-ID: From: Takashi Iwai To: "Mukunda, Vijendar" 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" 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 12:32:41 +0200, Mukunda, Vijendar wrote: > > > > > -----Original Message----- > > From: Takashi Iwai > > Sent: Wednesday, June 3, 2020 3:05 PM > > To: Hui Wang > > Cc: Jaroslav Kysela ; Mukunda, Vijendar > > ; 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