Re: [PATCH v4 05/14] ASoC: hdac_hdmi: Apply constraints based on ELD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 08, 2016 at 03:48:03PM +0100, Takashi Iwai wrote:
> On Fri, 08 Jan 2016 15:09:33 +0100,
> Mark Brown wrote:
> > 
> > On Wed, Dec 09, 2015 at 09:46:12PM +0530, Subhransu S. Prusty wrote:
> > 
> > > +static int hdac_hdmi_eld_limit_formats(struct snd_pcm_runtime *runtime,
> > > +						void *eld)
> > > +{
> > > +	u64 formats = SNDRV_PCM_FMTBIT_S16;
> > > +	int i;
> > > +	const u8 *sad, *eld_buf = eld;
> > > +
> > > +	sad = drm_eld_sad(eld_buf);
> > > +	if (!sad)
> > > +		goto format_constraint;
> > > +
> > > +	for (i = drm_eld_sad_count(eld_buf); i > 0; i--, sad += 3) {
> > > +		if (sad_format(sad) == 1) { /* AUDIO_CODING_TYPE_LPCM */
> > 
> > 	switch (sad_format(sad))  {
> > 	case AUDIO_CODING_TYPE_LPCM:
> > 
> > > +
> > > +			/* 20 bit and 24 bit */
> > > +			if (sad_sample_bits_lpcm(sad) & 0x6)
> > > +				formats |= SNDRV_PCM_FMTBIT_S32;
> > > +		}
> > > +	}
> > 
> > I really don't have a clear idea what the above is supposed to do or why
> > this is specific to HDAC and not handled...
> > 
> > > -	return 0;
> > > +	return snd_pcm_hw_constraint_eld(substream->runtime,
> > > +				dai_map->pin->eld.eld_buffer);
> > 
> > 
> > ...here.
> 
> 
> The PCM format cannot be determined uniquely as it depends on the
> container type and endianness.  So this can't be implemented in a
> generic helper.

Hi Mark,

Initially we did start out by adding these in common code (v1) and per
Takashi's feedback we moved this back to driver.

Please let us know if you are fine with approach

Thanks
-- 
~Vinod

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux