From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752302AbdLMD1c (ORCPT ); Tue, 12 Dec 2017 22:27:32 -0500 Received: from mga09.intel.com ([134.134.136.24]:61194 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbdLMD13 (ORCPT ); Tue, 12 Dec 2017 22:27:29 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,396,1508828400"; d="scan'208";a="11396857" Date: Wed, 13 Dec 2017 09:01:13 +0530 From: Vinod Koul To: Harry Pan Cc: linux-audio-intel@eclists.intel.com, alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, tiwai@suse.com, broonie@kernel.org, sathyanarayana.nujella@intel.com, jeeja.kp@intel.com, Adam.Thomson.Opensource@diasemi.com, harshapriya.n@intel.com, yong.zhi@intel.com Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: bxt: Refine the HW contraint of Ref capture. Message-ID: <20171213033113.GI18649@localhost> References: <20171205192127.16210-1-harry.pan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171205192127.16210-1-harry.pan@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 06, 2017 at 03:21:27AM +0800, Harry Pan wrote: > The patch restricts the HW contraint of the refcap of WoV stream > in single channel (mono) and 16k Hz based on platform implementation. > > Such that, the userspace program can rely on correct HW parameters > through the ALSA library call to manipulate the device. I think this has been discussed earlier in the context of kbl machine and we dont want kernel to have such restrictions. User space can request and open a mono stream.. > > Signed-off-by: Harry Pan > --- > sound/soc/intel/boards/bxt_da7219_max98357a.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c > index ce35ec7884d1..382f71228807 100644 > --- a/sound/soc/intel/boards/bxt_da7219_max98357a.c > +++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c > @@ -338,8 +338,23 @@ static const struct snd_pcm_hw_constraint_list constraints_16000 = { > .list = rates_16000, > }; > > +static const unsigned int ch_mono[] = { > + 1, > +}; > + > +static const struct snd_pcm_hw_constraint_list constraints_refcap = { > + .count = ARRAY_SIZE(ch_mono), > + .list = ch_mono, > +}; > + > static int broxton_refcap_startup(struct snd_pcm_substream *substream) > { > + substream->runtime->hw.channels_max = 1; > + > + snd_pcm_hw_constraint_list(substream->runtime, 0, > + SNDRV_PCM_HW_PARAM_CHANNELS, > + &constraints_refcap); > + > return snd_pcm_hw_constraint_list(substream->runtime, 0, > SNDRV_PCM_HW_PARAM_RATE, > &constraints_16000); > -- > 2.13.5 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel -- ~Vinod