alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>,
	patches.audio@intel.com, alsa-devel@alsa-project.org,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
	lgirdwood@gmail.com
Subject: Re: [PATCH v4 05/14] ASoC: hdac_hdmi: Apply constraints based on ELD
Date: Thu, 14 Jan 2016 14:21:32 +0530	[thread overview]
Message-ID: <20160114085132.GN11130@localhost> (raw)
In-Reply-To: <s5hfuy8dt5o.wl-tiwai@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 1576 bytes --]

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 #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2016-01-14  8:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 16:10 [PATCH v4 00/14] ASoC: hdac_hdmi: Add DP & notification support Subhransu S. Prusty
2015-12-09 16:16 ` [PATCH v4 01/14] ASoC: hdac_hdmi: Fix to check num nodes correctly Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 02/14] ASoC: hdac_hdmi: Fix to warn instead of err for no connected nids Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 03/14] ASoC: hdac_hdmi: Use list to add pins and converters Subhransu S. Prusty
2016-01-08 13:32     ` Mark Brown
2016-01-08 13:54       ` Vinod Koul
2016-01-08 14:04         ` Mark Brown
2015-12-09 16:16   ` [PATCH v4 04/14] ASoC: hdac_hdmi: Add hotplug notification and read eld Subhransu S. Prusty
2016-01-08 13:42     ` Mark Brown
2016-01-08 13:59       ` Vinod Koul
2016-01-08 13:57         ` Takashi Iwai
2016-01-09  5:39           ` Vinod Koul
2015-12-09 16:16   ` [PATCH v4 05/14] ASoC: hdac_hdmi: Apply constraints based on ELD Subhransu S. Prusty
2016-01-08 14:09     ` Mark Brown
2016-01-08 14:48       ` Takashi Iwai
2016-01-14  8:51         ` Vinod Koul [this message]
2015-12-09 16:16   ` [PATCH v4 06/14] ASoC: hdac_hdmi: Enable DP1.2 and all converters/pins Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 07/14] ASoC: hdac_hdmi: create dais based on number of streams Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 08/14] ASoC: hdac_hdmi: Create widget/route based on nodes enumerated Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 09/14] ASoC: hdac_hdmi: Assign pin for stream based on dapm connection Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 10/14] drm/edid: Add API to help find connection type Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 11/14] ASoC: hdac_hdmi: Add infoframe support for dp audio Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 12/14] ASoC: hdac_hdmi: Add codec suspend/resume handler Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 13/14] ASoC: hdac_hdmi: Fix to keep display active while enumerating codec Subhransu S. Prusty
2015-12-09 16:16   ` [PATCH v4 14/14] ASoC: hdac_hdmi: Fix to enable device configuration in hw_params Subhransu S. Prusty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160114085132.GN11130@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches.audio@intel.com \
    --cc=subhransu.s.prusty@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).