From patchwork Thu Oct 3 15:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175161 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp578430ill; Thu, 3 Oct 2019 09:47:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFMxTaHVB8+78pLVFxWEvv4gWDs8OBhHdosXFtC+Dp6KuxaZQ2mMCku5LGBk0ovb9tjhPd X-Received: by 2002:a17:907:20c4:: with SMTP id qq4mr8625571ejb.161.1570121241135; Thu, 03 Oct 2019 09:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121241; cv=none; d=google.com; s=arc-20160816; b=y5BGlBZF+KPLlyr3mXme25csYejDugvIS9jS5GE8CWoSmY7VpjoM6L+ocE3BBdf1wj 94xWo3wUdKXjdENoHjrMXbtN0Zt+eFnpruPBOrbw8dTUs2UQLUKBiIr4o0hvcHXRDu/j atUi3jZLWws5az6BmuL6mwyKKshl+iUKtQ9bFy3YufhZfBBkx1MRnfaHmN1ZjtjJfk5o R7NYxoCGxoCt/Qca27oNKxPv6KtVyWso/Y7KyVV+RoQeC/4S9/RoI2Q9Y4cY9nsYb+3x lGei3b46qplGwaBnf8/7SVRJtVjB0G7jEgPsnDG+aXJM5dJELAUJtj7vJMe+rpzVBZeP Kegg== 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=Pqcw339CMBrgFqnM2yiv3guprrWrgIh35kct79yMezU=; b=PPxr4pU33KqC36+XckK+gj213glZ4yoq/TDafSnZ7gXT2N4jiG3zacuFxKLaH9eoxo /JXEC8kADV2PxC9LS9ltvYXc0jk8tWesAewdrWLfq6P03/IHRmhMH3/TOgf0Fuqw9V6L /y6hm7gSekchrHPDIipceoIF7I9QMnosMzqyHQqEJfxJsZzLJ8fZ4izd0G1TaznnxszM yUFUuQTmspLX5behfng0Q5YNQMwBVhqWApXyVk05Lo1TUwYmG6P0wPSVMu+xsmT7r0c6 41U0AW1hpgkRTSRlrJtg3RMWCaMpeKnIgKFKmkFoDQCAH+zWMoFtZw4QGGXgqwoDLx19 PnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YuUQJhDh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 v14si1926498ede.424.2019.10.03.09.47.20; Thu, 03 Oct 2019 09:47:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=YuUQJhDh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393022AbfJCQrT (ORCPT + 14 others); Thu, 3 Oct 2019 12:47:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:60832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391908AbfJCQrS (ORCPT ); Thu, 3 Oct 2019 12:47:18 -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 5E83F20865; Thu, 3 Oct 2019 16:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121237; bh=5eDikgOSaSe6iEg5YcefwyC0Wju1DF4Oj1szVWREBus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YuUQJhDhGJFMf4KHgw1ZTdRVexGhwKo4LYug0ywSINCLrY9hIZOvhzjfGcixRf/9w fTOuRaUIDLVkKxakaSHMtLGaEky7+W5LWO0zV9CYCDbCTktmxacP8w96TypE5ZNkak YwYEDHHNn1g1cnMJJ3/RKWZMlmsPO9moaZAT9EtM= 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 5.3 205/344] ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set Date: Thu, 3 Oct 2019 17:52:50 +0200 Message-Id: <20191003154600.493014307@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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(+) -- 2.20.1 diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 748f5f641002e..d93db2c2b5270 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -306,6 +306,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;