From patchwork Thu Nov 30 10:20:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1870041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sgsg759PLz1ySd for ; Thu, 30 Nov 2023 21:21:39 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r8eAk-0003wd-6k; Thu, 30 Nov 2023 10:21:30 +0000 Received: from mail-pl1-f182.google.com ([209.85.214.182]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r8eAU-0003rb-BH for kernel-team@lists.ubuntu.com; Thu, 30 Nov 2023 10:21:14 +0000 Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1cc9b626a96so7474305ad.2 for ; Thu, 30 Nov 2023 02:21:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701339672; x=1701944472; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nAGA2L6IfIPXeFnHS+y0qmIHgK3Vg8sihjgdy9l1+mE=; b=ct+Z3yuKSFaPLKYcQKgiu5UDeMPBH2lmaKPhWvCodclaJqBfM0J39v73GA1nA6smZ/ N2seuaiTTtlsN7QZFQuL4PCmmehjex+YF/zsRPUKfmneIlpO0PjTMj5VMcFK3OqHHshC OReawSYJ+S/5zwz2An/g1c3cu9592e+enOqU08oDbC4DswQ5TJdYeXajbDJGkE7SLHq1 sRZmdMpblFx3El2novQ8lkmeTKTAhfe+fpoxKHDT4xtN7+pX00ButQCfw+B4E+yqKQja TDAUo2Yl2qzNwJ4ban6l01CBR44CYa/O3icEOstqztchUcrA/8iszDnvCwbJ9q9JMfv/ SDyQ== X-Gm-Message-State: AOJu0YzvUJ0wJRxd7CAmoiQE2aVCUtDANbUX5O/SQ9Pv0Qa4IHsBxuc7 B6wI6W4gIP7rRYu1CYaaun/RLUv1m1fiRg== X-Google-Smtp-Source: AGHT+IGX4AV9KwWf8I7uJT5jeS8ECtxxGBI5Ac+aVdi2mXQ6Vq0hLHzNNDkNGcWw8aA7cTT+Q8c4+g== X-Received: by 2002:a17:902:cec1:b0:1ce:5f09:ffdf with SMTP id d1-20020a170902cec100b001ce5f09ffdfmr24904160plg.0.1701339672170; Thu, 30 Nov 2023 02:21:12 -0800 (PST) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id ij24-20020a170902ab5800b001cfcf0fcc4esm983476plb.304.2023.11.30.02.21.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:21:11 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/4][SRU][Mantic] ASoC: Intel: sof_sdw_rt712_sdca: construct cards->components by name_prefix Date: Thu, 30 Nov 2023 18:20:29 +0800 Message-Id: <20231130102030.2407035-4-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231130102030.2407035-1-vicamo.yang@canonical.com> References: <20231130102030.2407035-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.182; envelope-from=vicamo@gmail.com; helo=mail-pl1-f182.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Bard Liao BugLink: https://bugs.launchpad.net/bugs/2042090 sof_sdw_rt712_sdca is used by rt712 and rt713. Using different cards->components string allow UCM distinguish the two codecs. Reviewed-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231012190826.142619-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown (backported from commit 5124d08d0ea49c7f4dda989827d0959e58a22150) [vicamo: fix use of snd_soc_rtd_to_codec] Signed-off-by: You-Sheng Yang --- sound/soc/intel/boards/sof_sdw_rt712_sdca.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c b/sound/soc/intel/boards/sof_sdw_rt712_sdca.c index 84c8025d24e3f..298df62e6aad5 100644 --- a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c +++ b/sound/soc/intel/boards/sof_sdw_rt712_sdca.c @@ -80,10 +80,12 @@ int sof_sdw_rt712_spk_init(struct snd_soc_card *card, static int rt712_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; + struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); + struct snd_soc_component *component = codec_dai->component; card->components = devm_kasprintf(card->dev, GFP_KERNEL, - "%s mic:rt712-sdca-dmic", - card->components); + "%s mic:%s", + card->components, component->name_prefix); if (!card->components) return -ENOMEM;