Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1267267lfc; Wed, 1 Jun 2022 13:36:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEc72tyBz8i+2RtIY+zH8ZuLP4VYjtkATKS5H1N5apBLH66fOah/MTgMOuefPmt7YbEVQ3 X-Received: by 2002:a17:903:2488:b0:163:b2c0:7efe with SMTP id p8-20020a170903248800b00163b2c07efemr1198732plw.164.1654115819140; Wed, 01 Jun 2022 13:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654115819; cv=none; d=google.com; s=arc-20160816; b=Gug/O9LW3V7XfEjRKI7s6SrTfZm3jIgHAnBYL+iVizsq4agxHABkhdbsTctiMZBcqe xh391bGQXatAundFhDoN/2WzZrF+nhyWJzfJAMJrN6gPunp2HLtwZXT3kl5t2+IUj07S gg1QivPAoE++Kn7IQbFf3y8exCJEMqs+vhu0sRDSYUEWi00UQADXdlrgKB+spU0oNZ3H pwlq4YFKht2XFks5lTUHjsrp2HWWD7bF3OG7R5ejMY+pANNY68HP0wr/ZdKkGhTSagYS r98HdGqujOq/GjliVfnTxkYbe80gMRBHiRocvEHPm36DljhlSekdf+3q+8HyJQ5/FLp5 oesQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=p+ES8J/kTxqIyacXomjy5D9ep+HFUqaDp1D8aKDEzHE=; b=P5BRiE6ox9E4J0YWIaL1rZv9cVQCyswACbNLdAGYgLOmW5EriPYYChfWDzR2/uqmCR viMjKX0lqqnUEPrgePsqEqfVr3m1lXuMbAkqVBAyXr+S8oC0YT8E3aCEmkXVK0pWpU/f olkernalhnNcaMFQTmCHdNZepGBFThqcPuPdAiKlA8KCt8g6gj0xR75J/BDMHqJmJ3q5 sqSGVK6n4fNoO4n+8JWZQqRax8XwQxqYl0xjjXC6ZItwG936Rt9iHh6hsOy0QGjbPKak QpXl9YJmvxa5hJsZFfd7kDvwtJaJ4gAVo0GBarQkOHDm/au+536v49DuMMN73rPaRswM f5Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YGim7AhR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x24-20020a63fe58000000b003f655829a2csi3724941pgj.346.2022.06.01.13.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:36:59 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YGim7AhR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A8F2B1DF139; Wed, 1 Jun 2022 12:45:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345555AbiEaPOi (ORCPT + 99 others); Tue, 31 May 2022 11:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237336AbiEaPOh (ORCPT ); Tue, 31 May 2022 11:14:37 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1112261616 for ; Tue, 31 May 2022 08:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654010076; x=1685546076; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=KzVObEc7Veab/GZreg6FyOROGy7YjFcSKS2Z9DBNJis=; b=YGim7AhRATWaafYe5Wl2U9pp+RJg2yS24tp1yg5GHCcT8+IXVXbTMJdM VPmAAe4SW8IFvr9cJ/NUQyeWXTtE92XQurp1H8v1rrZNqcHspZU4HKxvy NTRissCBWZPBs552vUNokomh1HRTuKCv37gotzZn2AxbDK3UqaEIvwoJW uZwF8yxRwarOqRuKCCodTv/SM2QZ0WlgbujYyN65vR9x5cqHK19ctQMGN j85eF3H5GNmKRlziTmnT8SbQVVHAIB86qpxgo35icRCZK8JRLnuyt61Li /VsT3ayZhUFG9UAi2qrDIwA6UsbgiKSaIJpNAz6WpNrUvS3zZIVjrUsaZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="361660467" X-IronPort-AV: E=Sophos;i="5.91,265,1647327600"; d="scan'208";a="361660467" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 08:11:13 -0700 X-IronPort-AV: E=Sophos;i="5.91,265,1647327600"; d="scan'208";a="720349516" Received: from kmoorti-mobl.amr.corp.intel.com (HELO [10.212.153.18]) ([10.212.153.18]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 08:11:12 -0700 Message-ID: <8a8a6bd9-aabf-6f27-0422-a47b01556276@linux.intel.com> Date: Tue, 31 May 2022 09:51:36 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.0 Subject: Re: [PATCH] ASoC: Intel: cirrus-common: fix incorrect channel mapping Content-Language: en-US To: Brent Lu , alsa-devel@alsa-project.org Cc: Cezary Rojewski , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Bard Liao , xliu , linux-kernel@vger.kernel.org References: <20220530125421.885236-1-brent.lu@intel.com> From: Pierre-Louis Bossart In-Reply-To: <20220530125421.885236-1-brent.lu@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/30/22 07:54, Brent Lu wrote: > From: xliu > > The default mapping of ASPRX1 Slot is left channel. Map the slots of > right amplifiers (WR and TR) to right channel. > > Signed-off-by: xliu > Signed-off-by: Brent Lu > --- > sound/soc/intel/boards/sof_cirrus_common.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/sound/soc/intel/boards/sof_cirrus_common.c b/sound/soc/intel/boards/sof_cirrus_common.c > index e71d74ec1b0b..64ca0e3991dc 100644 > --- a/sound/soc/intel/boards/sof_cirrus_common.c > +++ b/sound/soc/intel/boards/sof_cirrus_common.c > @@ -107,6 +107,7 @@ static int cs35l41_hw_params(struct snd_pcm_substream *substream, > struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); > struct snd_soc_dai *codec_dai; > int clk_freq, i, ret; > + int rx_ch[2] = {1, 0}; Should this be 'const'? I am also not clear on the mapping, how does this select the right channel? This selects slot0 and the left channel, what am I missing? > > clk_freq = sof_dai_get_bclk(rtd); /* BCLK freq */ > > @@ -134,6 +135,17 @@ static int cs35l41_hw_params(struct snd_pcm_substream *substream, > ret); > return ret; > } > + > + /* Setup for R channel Slot: WR and TR */ > + if (i % 2) { > + ret = snd_soc_dai_set_channel_map(codec_dai, 0, NULL, > + ARRAY_SIZE(rx_ch), rx_ch); > + if (ret < 0) { > + dev_err(codec_dai->dev, "fail to set channel map, ret %d\n", > + ret); > + return ret; > + } > + } Should we do this loop for the left channels as well to have an explicit setting? > } > > return 0;