From patchwork Tue Nov 17 13:04:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 325498 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4186038ils; Tue, 17 Nov 2020 05:54:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhYGnwcCjHl/9GN8W5J3PHChfEepGNddCAwmecZdCw+sFyEwTPRwl051LatC1ABV6op/PN X-Received: by 2002:a05:6402:a46:: with SMTP id bt6mr21522316edb.101.1605621289944; Tue, 17 Nov 2020 05:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605621289; cv=none; d=google.com; s=arc-20160816; b=DOTQYVJQ2QoOwLbFXnHK7OiAroiyzZIZ4E8K7nzHLVuDFsKSWYSpzLoy+moKUFlf+J XdrCrpRitQZ2lNrEH6SzOj7OinKhbDAkX3APMh3Im7Da5mZxkLzRr7Z1K0gEvlgoZ2vI 6ET5r17fg0ekgHOBFpxgT81bkorYWcdEX/Ck81s0heViUhch+94zXwQk63xtfyyAQJAk R9Rr8idrpdxNY0CEuDPXQoCkhc+pnvw5xT+KAfOSfB5gYTcgF65yq7Y5PQOEYFoUPPsQ +AYFQj/BBp85pGFTU0U9uswb6S/EJjUG7G/1P/AbNxU5d6Ii1TeXlbD7hm0HapMlzAYS rRag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Id7J+QC6BhZ2fbX5TP3+6N1opM33dpcHNMP2gKhsLLw=; b=lElspEea5Gf5mU5qfEMNqXp6AEZxr93B//T7QjT2AY9YSjRfPxHU1qxy9LlaaHwFM+ Fb4vU3PK4Mtu6LncCZFWzkvRjkKE9Bq9gNcdj3yGlO/HjRM7Nnv6Hn94G2qilYljW1S4 kPPQT6lF5WG/qXaL+EhAg+Pf3iCCM4VEAxa2Teic9Lur6HICbpaz52ZajEIyiqrctdlK jeoUFeOMHD5SrylumHWAnFfSLOEkFt5H15PzhO7VHYnpzi4aLT6IHPOizFj6WjAastDQ 6Q/kZ9t66AFVrwTj/zuqKLXFhmEWcQHWI/hzbpWmFLvS5MinTtvoYGuo7H5KZYNBb9iB LkwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Py3eRxWs; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j20si14297848edt.219.2020.11.17.05.54.49; Tue, 17 Nov 2020 05:54:49 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@kernel.org header.s=default header.b=Py3eRxWs; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730371AbgKQNyQ (ORCPT + 14 others); Tue, 17 Nov 2020 08:54:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:33168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731365AbgKQNZs (ORCPT ); Tue, 17 Nov 2020 08:25:48 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 58D272465E; Tue, 17 Nov 2020 13:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619547; bh=FMWQJ4lahrISE8QnBwTCGxGSH1tt32tcmINfITuIt2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Py3eRxWsUqjXAQrBsArz71VVdPraqZQVjGiUlD1oWK6WI7iap0TV9WrKIqVUPYY91 cIciImrpy8TO8QaP7LHm7RKrCVkAsDkhwkz5q3WLuJsC3lcEl1JmVGcA8gOdQwWnVX bUPfCPtsGv2vofaxlQDCX4PgSD80MlYXv5uQ3uZY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Mark Brown , Sasha Levin Subject: [PATCH 5.4 046/151] ASoC: qcom: sdm845: set driver name correctly Date: Tue, 17 Nov 2020 14:04:36 +0100 Message-Id: <20201117122123.668746794@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122121.381905960@linuxfoundation.org> References: <20201117122121.381905960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 3f48b6eba15ea342ef4cb420b580f5ed6605669f ] With the current state of code, we would endup with something like below in /proc/asound/cards for 2 machines based on this driver. Machine 1: 0 [DB845c ]: DB845c - DB845c DB845c Machine 2: 0 [LenovoYOGAC6301]: Lenovo-YOGA-C63 - Lenovo-YOGA-C630-13Q50 LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216 This is not very UCM friendly both w.r.t to common up configs and card identification, and UCM2 became totally not usefull with just one ucm sdm845.conf for two machines which have different setups w.r.t HDMI and other dais. Reasons for such thing is partly because Qualcomm machine drivers never cared to set driver_name. This patch sets up driver name for the this driver to sort out the UCM integration issues! after this patch contents of /proc/asound/cards: Machine 1: 0 [DB845c ]: sdm845 - DB845c DB845c Machine 2: 0 [LenovoYOGAC6301]: sdm845 - Lenovo-YOGA-C630-13Q50 LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216 with this its possible to align with what UCM2 expects and we can have sdm845/DB845.conf sdm845/LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216.conf ... for board variants. This should scale much better! Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201023095849.22894-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/qcom/sdm845.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.27.0 diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 7e6c41e63d8e1..23e1de61e92e4 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -16,6 +16,7 @@ #include "qdsp6/q6afe.h" #include "../codecs/rt5663.h" +#define DRIVER_NAME "sdm845" #define DEFAULT_SAMPLE_RATE_48K 48000 #define DEFAULT_MCLK_RATE 24576000 #define TDM_BCLK_RATE 6144000 @@ -407,6 +408,7 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev) goto data_alloc_fail; } + card->driver_name = DRIVER_NAME; card->dapm_widgets = sdm845_snd_widgets; card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets); card->dev = dev;