From patchwork Tue Nov 17 13:03:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 325305 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4171724ils; Tue, 17 Nov 2020 05:34:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQRkH2vSfxYjA7iv9J5qMeGXIHaJPi6EIvxfOldshk4O3eUW7ApT4JkE0jWTseb9LRxeVb X-Received: by 2002:aa7:cac2:: with SMTP id l2mr21020745edt.141.1605620062878; Tue, 17 Nov 2020 05:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620062; cv=none; d=google.com; s=arc-20160816; b=WarItlvgRUeGf9fGjk+5NPqW89btaPDoXQkCbcwEXhVvjrIS5zEQk4iStHZs9qCsK3 48pBauSAswM36Ow7dqIf7/6rablxxG8WWJuWSHVMVu33hmXxGv71c4rDKvECTQl57xDY WsWmJT8pHpkDuGv/dWLT43VpKCFjvMlrfydnmLAkmX5ZhafBAlcdvm5Bwm7imnWPOHPX MQIeKptr8rbHk/tbLeAMN6Q7w5q4YpgQwFJogR0h/nde816gYWn2FkvhIcJdNnlRW2Un rjZSoCDeYCk0e5lCTnlY2U38GYP0IPcIjmCQPktKIDHu5ifFQMH/WFYsA3nTYzfeWa0n hGAQ== 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=x0OkZEIqxH/jOa2OL8URaHF14e6KPIFHsGSus/r3a9o=; b=j2+kv3g/9XgBx/+H+loS1yABtCZY7ihetVnfW6a0DIiZwqOpZS0/8tbW76Qm7v3D51 UlF7K7jJfTmGv2m25WcEtVquuOXTKU71LHBJZIHYcCGzkghB+rNY/j6r4S1ZPpNVsNQn NiNK9DYUNZhwgnPgYM3g4fFDSz27PulhqCC7wvyajdAWkmQuQCFxD2ZjREgQkYOueYdr /f7Xhda9XNNL4oysSsBengDMEe86tuxh7LFIUKulnbd9xxHVRRWlu7qerZEazMDlSqxr UHCBvTB39jT6o0yi8k+P2hzQHYedGak2z3ABYa7VyMjnOO38TYM8+IF74S85TNr429OO I6ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H2lkXdAI; 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 kq9si1105003ejb.546.2020.11.17.05.34.22; Tue, 17 Nov 2020 05:34:22 -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=H2lkXdAI; 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 S1731918AbgKQNdb (ORCPT + 14 others); Tue, 17 Nov 2020 08:33:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:43448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731527AbgKQNda (ORCPT ); Tue, 17 Nov 2020 08:33:30 -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 852F2207BC; Tue, 17 Nov 2020 13:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620009; bh=Au+MdApOodfV7Qahbj4kNojkYoQIS9jepWa5HMULrSQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H2lkXdAIoN+DizV5wtSGfavRb49qSKz75ignxvufzJWbk1CimjEFWp5dul9JNrg21 x1yPXGogBTRSgQH6N4WUrgifD8MzRjDyW8/b4jdlNCjOoJ4I5THdINEuTf7j3buIU+ qG2OVcQpFInLeolAzgdSqYx+xflpm+Et21stkZCY= 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.9 077/255] ASoC: qcom: sdm845: set driver name correctly Date: Tue, 17 Nov 2020 14:03:37 +0100 Message-Id: <20201117122142.699142972@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@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 ab1bf23c21a68..6c2760e27ea6f 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -17,6 +17,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 @@ -552,6 +553,7 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev) if (!data) return -ENOMEM; + card->driver_name = DRIVER_NAME; card->dapm_widgets = sdm845_snd_widgets; card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets); card->dev = dev;