Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp278086ybi; Wed, 29 May 2019 21:14:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHTKPp9mIXaS+FqrwS8XAJqYjSLtPQVodg1da5tX/1yvyHJOs1U0s9wUOVKnHjUlYW7Jzc X-Received: by 2002:a17:902:b590:: with SMTP id a16mr1884852pls.168.1559189653101; Wed, 29 May 2019 21:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189653; cv=none; d=google.com; s=arc-20160816; b=a8pcX2vtS4xCAKbbVGDwL7RyltRqxh4lleGM87nDkZNFPCY2vL7rjwUPyORMIl7x8Z AH1YZ4Oryq2PvltPA5Z0m4DVJH/+EkJfE+poc+ThQI9aI2eXbkJoNYv1xkUI7z08JFG4 PfQZJnYuIOwgqIZwrG1MI6cVIhcZwE/6OboEEuq4WCf2YdpfwXk97fPxg4dU5IleeeJw O43omeSHgn4Szk6mk6B0MHGxhIvVDVXEH10RmeYJXvo95KqJnkouuSjEDG0i0aVH9jJf 2bVhrkEZVwau7B4OYwtVVp5tno80r4zEZUiArql30Jrg9Ws0BtsY6fhrXaJmUjRWwVWr Xb9Q== 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=4vnFbvYnMv2EobOOAiFZeDbuYosqoWcC4+jYjXEdfTo=; b=c2dweK0rAMVIOGCKgBN8lDc0CA8gC0A1TFo4MGLzfbfVgIwU83V9JcMLNP2nMxxLig MXLTrHq2AlutfcvnUnSkS6LUBbZryoXS1011c5/GEpLsO0RvtYoILYNps/cgm25vZSuR OgHdEKyQ4bjlfDcCup7Ncu8yJYAFq96XYQpjSTjrxXibn3sWHbo9Y/GAT7HCvvAs5g21 6MIbHjz35v2Wp06MwTNMedkmrPpwF90Cz9cgQxwJBzWlewHdMmrhz/AOclNPExACxKuu HT27r8zS/3wJE7furrLVAFmg/ab7UYWKthL65+Nmxif4y91+o67Au/VI6FuLXP3LEf+7 arYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="rzoDiR/K"; 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 x5si2012297plo.164.2019.05.29.21.13.57; Wed, 29 May 2019 21:14:13 -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="rzoDiR/K"; 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 S1727210AbfE3ELq (ORCPT + 99 others); Thu, 30 May 2019 00:11:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:43956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730809AbfE3DQr (ORCPT ); Wed, 29 May 2019 23:16:47 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (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 EA450245AB; Thu, 30 May 2019 03:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186207; bh=IxlLU21AYF8lNGgu0aEl00aZGtBAT2KobApAnq5506E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rzoDiR/KIS/j5gyHs9vsBd9C8ksfeAtLv9nQCSmbFiALSdaN5zTK5RsR/DbQW+sTw 19slcSYVazPOcCaa+18g7O1TIfe9gXDND2c6RAlgEtzfCkrQxeLfMFGI5b9OxHecf8 9hg7oORL3I2dm9+NWaGgggKnd4I+ewpE5G+BYwcI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Baluta , Nicolin Chen , Mark Brown , Sasha Levin Subject: [PATCH 4.19 095/276] ASoC: fsl_sai: Update is_slave_mode with correct value Date: Wed, 29 May 2019 20:04:13 -0700 Message-Id: <20190530030532.100483140@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@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 [ Upstream commit ddb351145a967ee791a0fb0156852ec2fcb746ba ] is_slave_mode defaults to false because sai structure that contains it is kzalloc'ed. Anyhow, if we decide to set the following configuration SAI slave -> SAI master, is_slave_mode will remain set on true although SAI being master it should be set to false. Fix this by updating is_slave_mode for each call of fsl_sai_set_dai_fmt. Signed-off-by: Daniel Baluta Acked-by: Nicolin Chen Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_sai.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 4163f2cfc06fc..bfc5b21d0c3f9 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -268,12 +268,14 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai, case SND_SOC_DAIFMT_CBS_CFS: val_cr2 |= FSL_SAI_CR2_BCD_MSTR; val_cr4 |= FSL_SAI_CR4_FSD_MSTR; + sai->is_slave_mode = false; break; case SND_SOC_DAIFMT_CBM_CFM: sai->is_slave_mode = true; break; case SND_SOC_DAIFMT_CBS_CFM: val_cr2 |= FSL_SAI_CR2_BCD_MSTR; + sai->is_slave_mode = false; break; case SND_SOC_DAIFMT_CBM_CFS: val_cr4 |= FSL_SAI_CR4_FSD_MSTR; -- 2.20.1