Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp170819ybp; Thu, 3 Oct 2019 11:48:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1OV5X9hB9Gou32ay33eWreWasUIqshIlYsZ2w5ZLntnt16AR1F3QEnFjqGk9wyJeD7xW6 X-Received: by 2002:a17:906:bcd9:: with SMTP id lw25mr1446678ejb.330.1570128502077; Thu, 03 Oct 2019 11:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570128502; cv=none; d=google.com; s=arc-20160816; b=hQe5zararZwcc7LWbZJPyDq+xopHuK4CE5R5C0n3rwwhkJHC0aORj7E7pXocP6ZGbl aQ7di2sQZK6ekQiOwqpQZ3BCAPlMI/pFkqKQxPnxwidyGwVUL3AUae3VGyfiL+zLgUFm D3+FYghFukPwFrGxFjIoZzPZqWKzQtornzvFN09WkhFnhMx/kHW2TdK+KwYZ0kgus9sE F0gwkGnQoP+T/TVi3sMugBivRVRWHR3L+JJN/aibVt9G9+1JQxaEfwNsidpBku/T0tmO Wx9g6vIbyrpU6asbXgGPi4RX6L0mHWBLsGu+HT2OLTfQarhQA07s7RBTiBkvEmv16FZm InNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TrHNPkemY5sNfrWgGiuF6eXFFQB5y4Q7TXd0qEx/fjU=; b=duTYhvQxIW0LUuTXa21PoasoXOSz93LffLCiGE0ocKzv4SzpdYjJHTh6H5lnj56Vs/ QVlskh5jeqZ5qgT1NEYg+ezBgWQfdUbM5F/TI0OqgEQJHghCMETqP6YIWSbmRPZgGfoI cEq71pTVP1INtj0y/Ks46upQ38SJxBnsFeP5J4YgYxjmgzedvYbxyBor0oWsZSHJdWR/ 0bNLGTSO/DFYcU/yMpxLjalSHpaj1uIFOEL5cgTWaVb0DfNMpoGs2iqLjJJqQ5EO0xuK 8X0uJ9uP9jfJh98DWHCKRym1gXpAEFnYPjQrTlRxpbpgNVnXwJFRp/ssJIsqiuV+kYXT mRew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fchApmjo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22si2105787eda.27.2019.10.03.11.47.57; Thu, 03 Oct 2019 11:48:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fchApmjo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728610AbfJCP6p (ORCPT + 99 others); Thu, 3 Oct 2019 11:58:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:41536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731279AbfJCP6n (ORCPT ); Thu, 3 Oct 2019 11:58:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 0893120700; Thu, 3 Oct 2019 15:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118322; bh=ajS824LenRlv1kgE8cKvjNmdtuc51nUxbHZHmDxrsXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fchApmjodAlmit9FMs4Wz3KVIFC0ZqnV48lC4MrzKEIwEt8xa2+WJTyjJc0epVsPU Ts/FPYjVEzFDcjKjLf1Med/bGJEndSqk3sznqeKxdQ5asU/GZZ8Vsw6hedGmC4elvR OqmR4rE72+mhwwQtlwFWgOKJ/myHHtndKT4cghZ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Arthur She , Mark Brown , Sasha Levin Subject: [PATCH 4.4 69/99] ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set Date: Thu, 3 Oct 2019 17:53:32 +0200 Message-Id: <20191003154330.805351034@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154252.297991283@linuxfoundation.org> References: <20191003154252.297991283@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Ujfalusi [ Upstream commit 2ec42f3147e1610716f184b02e65d7f493eed925 ] Some tools use the snd_pcm_info_get_name() to try to identify PCMs or for other purposes. Currently it is left empty with the dmaengine-pcm, in this case copy the pcm->id string as pcm->name. For example IGT is using this to find the HDMI PCM for testing audio on it. Signed-off-by: Peter Ujfalusi Reported-by: Arthur She Link: https://lore.kernel.org/r/20190906055524.7393-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-generic-dmaengine-pcm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 6fd1906af3873..fe65754c2e504 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -301,6 +301,12 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd) if (!dmaengine_pcm_can_report_residue(dev, pcm->chan[i])) pcm->flags |= SND_DMAENGINE_PCM_FLAG_NO_RESIDUE; + + if (rtd->pcm->streams[i].pcm->name[0] == '\0') { + strncpy(rtd->pcm->streams[i].pcm->name, + rtd->pcm->streams[i].pcm->id, + sizeof(rtd->pcm->streams[i].pcm->name)); + } } return 0; -- 2.20.1