Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3942714ybb; Mon, 13 Apr 2020 19:40:40 -0700 (PDT) X-Google-Smtp-Source: APiQypJtgIVc188aFga2hbiVJubED/ZenCKGRjBQfWQ6QnVM59PYgy5XVs1mGk1IDeN3MaB6BTBD X-Received: by 2002:a17:906:d1c3:: with SMTP id bs3mr17762329ejb.334.1586832040371; Mon, 13 Apr 2020 19:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586832040; cv=none; d=google.com; s=arc-20160816; b=kSRZWTZR/z0AcW8MHMkdX8cyi1/HJZXq2Hoi4BzowrAHGGCT/wxFHQO+sJuKOUxPRQ Ci+ITNHE+iPiLNbocqTb0BHzAKweyRamqw/rErrQrd7GZlZvNg6T0tnULuxEhPpfXqnT nriRbTiaPjEZmLQrbdkjxByYGDPQLqw3FzN7Caw/D6nqhsoVEZ4Iqt04IuxnK9Reu6JY vokIUWlqG+5Gh+tAddL7kzMHKDl9X6AB1SPu501g3AJaSF5W57MzxOM/TdPfWm5PsQaO 51jhulkHqozdPYqVPQvBXLClMbmLZc0U3hY4XPKwOHXywKcSZX0bzaZlcePdWOeuh8MT quUA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=oqntWzZv6L9VXGO1Vz+eawGCo0SvFv4ZK2KISKeYvnc=; b=utppxae7zBgxf4vfHAEGoYd7cJNAXBBqT+Ud/iYIvOoTxw+7el31W3y49/fvNYA8qN 2hKd8F7or9kDAw9r8lIjwJQatnDcbjY8xHAWiBmSIzEJNjF2H+Jl/WUuGrx5EfdYi/HD v//NtyGWq8oONjsxhNRIjizrGkSWnGw8Wm8sfegAXSPOg5tgW+JRsUnouqr2JCYBLgrc mAoHiCNR6DZ1zgKk4fGY+K+oNgRJkcwfjJ9F7BBOd1Uo0DQWPjM48RoYoYchk5fjjhIj 4FGxE2iK/LfqKCBNbGh1q7l5bsZ0cdeh70B4dPxgMBXZVUMggwQhQex8kxnrVkITkKPp nTuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si413607edv.84.2020.04.13.19.40.01; Mon, 13 Apr 2020 19:40:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728746AbgDMKrE (ORCPT + 99 others); Mon, 13 Apr 2020 06:47:04 -0400 Received: from mga17.intel.com ([192.55.52.151]:27392 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727776AbgDMKrD (ORCPT ); Mon, 13 Apr 2020 06:47:03 -0400 IronPort-SDR: eWyaVDbvZjQG7skr/aXffuFAzuV+pCra6EJTM5TiW3UovssO+o59KR/Cru9f4mZnscxYWH4YHE ZvrtVtnO7hGA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 03:47:02 -0700 IronPort-SDR: ayMz8icoKuu1Cou9MhiqAeFL4MrjUzbHqplQK9F8EJo6KijVa0uvvgu/BoL+PHlCTnE7p2iB+x OduldT/7UWAw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,378,1580803200"; d="scan'208";a="243507850" Received: from ftehrig-mobl.amr.corp.intel.com (HELO [10.209.82.92]) ([10.209.82.92]) by fmsmga007.fm.intel.com with ESMTP; 13 Apr 2020 03:47:00 -0700 Subject: Re: [PATCH v2] ASoC: bdw-rt5650: remove 3-channel capture support To: Brent Lu , alsa-devel@alsa-project.org Cc: Guennadi Liakhovetski , Cezary Rojewski , Kuninori Morimoto , linux-kernel@vger.kernel.org, Takashi Iwai , Jie Yang , Liam Girdwood , Ben Zhang , Mac Chiang , Mark Brown References: <1586766533-18557-1-git-send-email-brent.lu@intel.com> From: Pierre-Louis Bossart Message-ID: <9a484795-ea4a-e559-4ea9-3de24417ec9b@linux.intel.com> Date: Mon, 13 Apr 2020 05:18:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <1586766533-18557-1-git-send-email-brent.lu@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/13/20 3:28 AM, Brent Lu wrote: > Implement a constrain to exclude 3-channel capture since only 2 and 4 > channel capture are supported on the platform. That looks like an error caught by the ALSA conformance tool? What are the odds that we have a similar issue with the other broadwell drivers which don't have a constraint on the number of channels either on their 'System PCM' dailink? Thanks -Pierre > > Signed-off-by: Brent Lu > --- > sound/soc/intel/boards/bdw-rt5650.c | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/sound/soc/intel/boards/bdw-rt5650.c b/sound/soc/intel/boards/bdw-rt5650.c > index af2f502..eedbdad 100644 > --- a/sound/soc/intel/boards/bdw-rt5650.c > +++ b/sound/soc/intel/boards/bdw-rt5650.c > @@ -83,6 +83,36 @@ static struct snd_soc_jack_pin mic_jack_pin = { > .mask = SND_JACK_MICROPHONE, > }; > > +static const unsigned int channels[] = { > + 2, 4, > +}; > + > +static const struct snd_pcm_hw_constraint_list constraints_channels = { > + .count = ARRAY_SIZE(channels), > + .list = channels, > + .mask = 0, > +}; > + > +static int bdw_fe_startup(struct snd_pcm_substream *substream) > +{ > + struct snd_pcm_runtime *runtime = substream->runtime; > + > + /* > + * On this platform for PCM device we support, > + * 2 or 4 channel capture > + */ > + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) > + snd_pcm_hw_constraint_list(runtime, 0, > + SNDRV_PCM_HW_PARAM_CHANNELS, > + &constraints_channels); > + > + return 0; > +} > + > +static const struct snd_soc_ops bdw_rt5650_fe_ops = { > + .startup = bdw_fe_startup, > +}; > + > static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, > struct snd_pcm_hw_params *params) > { > @@ -234,6 +264,7 @@ static struct snd_soc_dai_link bdw_rt5650_dais[] = { > .name = "System PCM", > .stream_name = "System Playback", > .dynamic = 1, > + .ops = &bdw_rt5650_fe_ops, > #if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) > .init = bdw_rt5650_rtd_init, > #endif >