From patchwork Sun Oct 17 16:00:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 12564399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96338C433EF for ; Sun, 17 Oct 2021 16:01:40 +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 4D96860E52 for ; Sun, 17 Oct 2021 16:01:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D96860E52 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=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 C4CE0172D; Sun, 17 Oct 2021 18:00:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C4CE0172D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1634486496; bh=Mwnn7mF0+MZFi+nZYJTYQ222Jj9mD5UFXcSlMqtOrX0=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=nfcSW6VXvaNgk2bQUfep7nqgn6OMHZkQ0F03Ba7okov77pQS3KupB9zvt9653DzoQ mWFyKlKo6VShz0S79mJYCS/kHGY5R+25a2UXOWJvUD2YhhPQGBGuv1Fi7QoEyqD1v7 7d2/sFWCEfYHvoHPAn4R6rx/pgi3CG5XwGV3vrZ4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 463EAF80254; Sun, 17 Oct 2021 18:00:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D119F80256; Sun, 17 Oct 2021 18:00:44 +0200 (CEST) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C8C3EF800E5 for ; Sun, 17 Oct 2021 18:00:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8C3EF800E5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qrLR02zp" Received: by mail-ed1-x52e.google.com with SMTP id g10so60657990edj.1 for ; Sun, 17 Oct 2021 09:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=8kT8uxQmVp/XocDx24aLnGXhZi2Xo78WndzfJoxUXf4=; b=qrLR02zphJEnatJargVO7TxpS34lT74UJQ7lr8oE5lRkxlgLQ8ArQlSrMq0GflGD4D 7dsC4ii8/jjoRXXFbXupZOzWH72mJb3LlTLH51cGjaN1yZtLeYc/5IbApZp/Vef1FWLv O/AxFsGAUDTwmk8J170VCDyJIOH8E6WyzOhazTkVUwtTpQvU++ESv905EVNkdr2mXK2S 1DDGvigBCQr5Rvcn8nh1zzwlQEdsXI/GzB8f6/MOmg4Kw9q9PTawl64ev7SjmyS1jQoc YTIdRXAompcx+ZsrJvdyZdBUbv6WIDveBO4RmE7looBbHelfcJlV7jz1ubenysiOzKEZ cvxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8kT8uxQmVp/XocDx24aLnGXhZi2Xo78WndzfJoxUXf4=; b=6s7JupVoWD6d5xBZ1fIrWv1M8w3muFPl07mQLG5trnhfYTVIgB0VK3JXMxeVTX39+x cAhAd4PIwlqwLCOc4/mIRdVc7pp4WtPq6nMbTDLbliZH8oVv2YjUlB7ICt01XA/PYxwt m9D26mU8apoXVuvfyYtTv8gLx4lC63qtj+Q2mOJbT9Wh6ndoVZdh7RQsBb14u5ofiQNi Yr9holF63Mea6M1HnKkocu1HubpN2wlr6vNE4hWGner+ss7CcE0d59g8QsjV7TD6lB+g RnPRWnHwnWLBbhtSeICvbq4mcUFnxN9PC2gafnxjzDGdgftNxfB8pKWk4UcTFJlHUKPg ABGw== X-Gm-Message-State: AOAM531+2BSrebd4q0B6evvP7UOxxhIb6N7yDmXO6Nm129wZKzRl02dM k3iiRL6yTxABZ98IjV1T2aI= X-Google-Smtp-Source: ABdhPJwTB0vfk1m5xsCYFd2NXY/+qkTRYqLJ8qato/ZDGtv+VE5V+xBNUFGnEFhH9R8hZ1fiItRyuA== X-Received: by 2002:a05:6402:3547:: with SMTP id f7mr36201251edd.395.1634486434122; Sun, 17 Oct 2021 09:00:34 -0700 (PDT) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id yz9sm7693135ejb.51.2021.10.17.09.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 09:00:33 -0700 (PDT) From: Christian Hewitt To: Jerome Brunet , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Kevin Hilman , Neil Armstrong , Martin Blumenstingl , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: meson: implement driver_name for snd_soc_card in meson-card-utils Date: Sun, 17 Oct 2021 16:00:28 +0000 Message-Id: <20211017160028.23318-1-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 Cc: Matthias Reichl , Christian Hewitt 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" Implement driver_name to provide an alternative to card_name for userspace configuration of Amlogic audio cards. Suggested-by: Matthias Reichl Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet --- The meson AIU/AXG drivers currently require alsa confs based on the board model name which is unique to each board. This is very flexible for audio use-cases, but not very maintainable for distros with a single use-case that need to support a large number of different Amlogic boards. Using a driver name to match the card conf instead of card/model name reduces the number of confs needed in the LibreELEC (Kodi) distro from 41 to 2. sound/soc/meson/meson-card-utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c index 415cc0046e4b..29b0174f4b5c 100644 --- a/sound/soc/meson/meson-card-utils.c +++ b/sound/soc/meson/meson-card-utils.c @@ -302,6 +302,7 @@ int meson_card_probe(struct platform_device *pdev) priv->card.owner = THIS_MODULE; priv->card.dev = dev; + priv->card.driver_name = dev->driver->name; priv->match_data = data; ret = snd_soc_of_parse_card_name(&priv->card, "model");