alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: patches.audio@intel.com, Vinod Koul <vinod.koul@intel.com>,
	alsa-devel@alsa-project.org, broonie@kernel.org,
	lgirdwood@gmail.com
Subject: Re: [PATCH v2 2/9] ALSA: hda - add helper to get channels from cap bits
Date: Tue, 12 Apr 2016 19:08:07 +0530	[thread overview]
Message-ID: <20160412133807.GC8655@subhransu-desktop> (raw)
In-Reply-To: <s5hfuur16jb.wl-tiwai@suse.de>

On Tue, Apr 12, 2016 at 12:10:48PM +0200, Takashi Iwai wrote:
> On Tue, 12 Apr 2016 11:56:10 +0200,
> Subhransu S. Prusty wrote:
> > 
> > This helper is copied from legacy hda driver.
> > 
> > Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > ---
> >  sound/hda/local.h | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/sound/hda/local.h b/sound/hda/local.h
> > index d692f41..57f07d7 100644
> > --- a/sound/hda/local.h
> > +++ b/sound/hda/local.h
> > @@ -16,6 +16,16 @@ static inline int get_wcaps_type(unsigned int wcaps)
> >  	return (wcaps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
> >  }
> >  
> > +static inline unsigned int get_wcaps_channels(u32 wcaps)
> > +{
> > +	unsigned int chans;
> > +
> > +	chans = (wcaps & AC_WCAP_CHAN_CNT_EXT) >> 13;
> > +	chans = ((chans << 1) | 1) + 1;
> 
> Let's make it simple.  This is equivalent with
> 	chans = (chans + 1) * 2;

Sure.

Regards,
Subhransu
> 
> 
> Takashi

-- 

  reply	other threads:[~2016-04-12 13:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12  9:56 [PATCH v2 0/9] ASoC: hdac_hdmi: Add multichannel support Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 1/9] ASoC: hdac_hdmi: parse eld for channel map capability Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: hdac_hdmi: parse eld for channel map capability" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 2/9] ALSA: hda - add helper to get channels from cap bits Subhransu S. Prusty
2016-04-12 10:10   ` Takashi Iwai
2016-04-12 13:38     ` Subhransu S. Prusty [this message]
2016-04-12  9:56 ` [PATCH v2 3/9] ASoC: hdac_hdmi: Add multichannel support Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 4/9] ASoC: skl_rt286: Fix to support hdmi channel map support Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: skl_rt286: Fix to support hdmi channel map support" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 5/9] ASoC: Intel: boards: Update skl_nau88l25_max98357a driver to support chmap Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: Intel: boards: Update skl_nau88l25_max98357a driver to support chmap" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 6/9] ASoC: Intel: boards: Update skl_nau88l25_ssm4567 driver to support chmap Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: Intel: boards: Update skl_nau88l25_ssm4567 driver to support chmap" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 7/9] ASoC: hdac_hdmi: Register chmap controls and ops Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 8/9] ASoC: Intel: Skylake: Add multichannel support for HDMI Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 9/9] ASoC: Intel: Skylake: Update channel map based on runtime 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=20160412133807.GC8655@subhransu-desktop \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    /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).