Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1550205lkv; Wed, 19 May 2021 12:33:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ+mak4/8Dlx7uZMuuGzZH+5vIVYOyBiIham+cAg3ZzFrMOxg6/CgiECFqDvOmbF7RTQCa X-Received: by 2002:a92:cda5:: with SMTP id g5mr668446ild.245.1621452785719; Wed, 19 May 2021 12:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452785; cv=none; d=google.com; s=arc-20160816; b=EDg8Y2dZaxWhAeQjWwzePI+v4gt0wuTHUxqVnMDWlLtGPsZW+TuvIqp7cR7KH35o6O HXgDFjZpKG87nt7lxmcPt/ubJf91apWAYUJjrip9cbjDrwMzQk7cy548VYCgmXLui8aq B4BkjpUsj04ZOTWcnkrEdo40nuuv9vv/U3B1XHIkVnpvsc0DZX9WXjkx66xzhOSmCFLg Slc7wEhiTuNpaax4XLSsw7lJGfUzKRtsS4Q1uAO/u8IH1WW1QTNuYmb7Upl1EaKLO9Qe dbHOgd2IEXWqZhuNRVa9BJfMAfcyYHSYebZbxDDstUtwUJ+AU/fLHVbwLMK9Z8EcboTZ 8fww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=9RcQ9v9QPlq03Y26uBjbqA7L/wB0h2ultT6e+0JtppE=; b=DlTujbYBFyaLk/TJoGugn6KEQkJ25k7AXSR3YTY2F3giWV/8shlfLUy96G00s0U5E4 L2Vmpy9gf2LHSDa4VchoL2lEuhaCHnbe9tGshFV6dPDfJ1WQGJ0/xXJzLjNAHKCDaEEW FZpDZ6svciBDwyrN8qk05bVkhwVfWcXujAgAzpgG6fXscq7rOlCETK40Z+8tqnaRI2Ox kkmqm78y/Je4GHOIEHIc4sD+MiCY6RN+uGFTR1C2LP1DrE6Q9ZzAnawIwvhmcbWaEYST rtI8WT8Btmqbo3pyquJOyGf6nhcte3ny+vr7qZkpUozcAklkaNuXo0kDDmAU8cW8x4lm qTtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T5nB4YJN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si248061jak.40.2021.05.19.12.32.52; Wed, 19 May 2021 12:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T5nB4YJN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240627AbhESNRH (ORCPT + 99 others); Wed, 19 May 2021 09:17:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235765AbhESNRG (ORCPT ); Wed, 19 May 2021 09:17:06 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E488C06175F; Wed, 19 May 2021 06:15:46 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id a2so18979899lfc.9; Wed, 19 May 2021 06:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9RcQ9v9QPlq03Y26uBjbqA7L/wB0h2ultT6e+0JtppE=; b=T5nB4YJNlamqRp4SvsAcy8JKObamBWOsiCQRt+EFUPpScmK3beaXK7G9gmFoG9XJO0 1jMwc7JMw9fMX6Bwd3y+d59vrVdrRjD0nBwL+qZuNNf2waw8jWJIWtK0sYw+21BCuQZ9 CXq1oGOChiaJjG4Oqztagnf7iQM+5Ib6H5f+jga1YfQXBe5pYGUd9tPst+T72NLVWLDm tFL3YCknrwyPiveDKWFoZZiyn8OunU1n3d72tM62tQYmS2Zexkq9uFXCrv6KDLEbHwPX AZUwhkzSZAi08yWac0ItMHZ/8/+wHMgQoK/sKytfInxnsacauCFFRRuvXD5gEXl8qL35 XBMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9RcQ9v9QPlq03Y26uBjbqA7L/wB0h2ultT6e+0JtppE=; b=X3yHGoovhIOu1d/HYLcbQFB9oq5nA1V9YDrXA1JZO6wvD7qDbSIbcRH89x+qcay6Dl BnvPWLGPqgb4prnFi69A1rNc8Le7suvhOweDKTBmjk9H7YBYk4VA0Yh5SY0iUcj0X4ax slrhrG+4mvAIkI9ri7vxoZaRjFia+9rwySD3LQ0cY3AWHU1qPJgjsRpTjOYM9/9VWW3k 41hexQyFa4iH/hACHyd+OvDGtwublDA+gIcx+3p+k9K4D0r5CNUuaRgpk8ZDNYFqLvqj 7t/5vHnYNVnexf7uW7kCU2nXvx8tJwC/3ahUnwLhiBNeNTmUWADPnYgWArv34SnfiFAn yDZw== X-Gm-Message-State: AOAM531LRFkWnXwobaGOqq3NIhpsOKF7Ku/4IJEdNuSyY2Aly9u8xpCC bPFgmH4K+0zRK0Mfo+WRLL4= X-Received: by 2002:a05:6512:3d2:: with SMTP id w18mr8489263lfp.573.1621430144965; Wed, 19 May 2021 06:15:44 -0700 (PDT) Received: from [192.168.2.145] (109-252-193-55.dynamic.spd-mgts.ru. [109.252.193.55]) by smtp.googlemail.com with ESMTPSA id c7sm2612193lfv.27.2021.05.19.06.15.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 May 2021 06:15:44 -0700 (PDT) Subject: Re: Question about Tegra UCMs To: Jaroslav Kysela , Mark Brown Cc: Thierry Reding , Jonathan Hunter , Takashi Iwai , Ion Agorria , Svyatoslav Ryhel , Frank Rowand , Liam Girdwood , linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Rob Herring References: <20210518001356.19227-1-digetx@gmail.com> <20210518001356.19227-3-digetx@gmail.com> <20210518180949.GA949047@robh.at.kernel.org> <20210518183455.GE4358@sirena.org.uk> <92cef674-c454-e08c-b44d-d8c08b1e8ccf@gmail.com> <562efe35-dd91-12a0-96a5-b8f4f34ea153@perex.cz> From: Dmitry Osipenko Message-ID: Date: Wed, 19 May 2021 16:15:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <562efe35-dd91-12a0-96a5-b8f4f34ea153@perex.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 19.05.2021 14:13, Jaroslav Kysela пишет: > Dne 19. 05. 21 v 0:31 Dmitry Osipenko napsal(a): >> Mark, could you please help me to understand the UCM naming scheme that ALSA uses.. >> >> About a year ago I tried to complain to Jaroslav Kysela in a comment to the UCM change [1] that it should be breaking the naming scheme of Tegra UCMs, but haven't got a meaningful reply and moved on to other things. >> >> [1] https://github.com/alsa-project/alsa-ucm-conf/commit/8ff2d50745efbb6959324f672460e413f0b618b8 > > I'm sorry about that, but it's better to create a tracked ticket (issue or > pull request). > >> Today I noticed that the naming scheme changed again and I still don't understand what to do about it. >> >> I have two devices: >> >> 1. Acer Picasso tablet that uses "Acer Iconia Tab A500 WM8903" for the card model name. >> >> 2. Google Nexus 7 that uses "ASUS Google Nexus 7 ALC5642". >> >> Previously UCMs were picked up by pulseaudio from these paths: >> >> 1. /usr/share/alsa/ucm2/Acer Iconia Tab A500 WM8903/ >> 2. /usr/share/alsa/ucm2/ASUS Google Nexus 7 ALC5642/ >> >> Now the lookup paths are changed to: >> >> 1. /usr/share/alsa/ucm2/Acer_Iconia_Tab/ >> 2. /usr/share/alsa/ucm2/ASUS_Google_Nex/ > > Yes, it's based on the driver name (which is incorrectly set /or not set/ in > your case). > > Lookup paths (with description): > > https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/ucm.conf > > The latest scheme is even different - lookups were moved to ucm2/conf.d with > redirection to the more descriptive layered configuration tree structure, so > the other developers can immediately identify the hardware which is > configured. See Qualcomm examples. The long card names does not help us so much. > >> Strace shows that pulseaudio searches UCMs only at these paths. >> >> The output of /proc/asound/cards: >> >> 0 [WM8903 ]: Acer_Iconia_Tab - Acer Iconia Tab A500 WM8903 >> Acer Iconia Tab A500 WM8903 >> >> 0 [ALC5642 ]: ASUS_Google_Nex - ASUS Google Nexus 7 ALC5642 >> ASUS Google Nexus 7 ALC5642 > > Fields are explained in: > > https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/README.md > >> Is there anything on the kernel side that I could change to get a working naming scheme? If yes, I may try to do something about it in the v2, thanks in advance. > > Try to set a meaningful driver name (usually the code handling the ASoC card > creation). It should be very close to the kernel module name (but more user > friendly). The current code for your hardware use the auto-generated driver > name from the ALSA long name. The current name isn't auto-generated, it's specified via the nvidia,model device-tree property. > Then try to reuse the existing configs - for example your Nexus 7 config has > many blocks from codecs/rt5640/* . > > Anyway, create a PR so we can discuss the details. I will create the PR, thank you very much. It's important problem which can't be postponed anymore since sound doesn't work without UCMs on Tegra devices.