All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Wang Xingchao <xingchao.wang@intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/3] ALSA: hda - show ICT/KAE control bits
Date: Mon, 13 Aug 2012 09:38:14 +0200	[thread overview]
Message-ID: <s5hr4rbw8bd.wl%tiwai@suse.de> (raw)
In-Reply-To: <1344838271-3528-1-git-send-email-xingchao.wang@intel.com>

At Mon, 13 Aug 2012 14:11:09 +0800,
Wang Xingchao wrote:
> 
> Enable two debug options for S/PDIF Converter Control.
> KAE: Keep Alive Enable; ICT: IEC Coding Type.
> 
> Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
> ---
>  sound/pci/hda/hda_codec.h |    4 ++++
>  sound/pci/hda/hda_proc.c  |    4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
> index c422d33..141b3b8 100644
> --- a/sound/pci/hda/hda_codec.h
> +++ b/sound/pci/hda/hda_codec.h
> @@ -386,6 +386,10 @@ enum {
>  /* DIGITAL2 bits */
>  #define AC_DIG2_CC			(0x7f<<0)
>  
> +/* DIGITAL3 bits */
> +#define AC_DIG3_ICT			(0xf<<0)
> +#define AC_DIG3_KAE			(1<<23)

For DIG3, it should be 1<<7.  (dig3 begins from bit 16.)

> +
>  /* Pin widget control - 8bit */
>  #define AC_PINCTL_EPT			(0x3<<0)
>  #define AC_PINCTL_EPT_NATIVE		0
> diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
> index 7e46258..a222aae 100644
> --- a/sound/pci/hda/hda_proc.c
> +++ b/sound/pci/hda/hda_proc.c
> @@ -419,9 +419,13 @@ static void print_digital_conv(struct snd_info_buffer *buffer,
>  		snd_iprintf(buffer, " Pro");
>  	if (digi1 & AC_DIG1_LEVEL)
>  		snd_iprintf(buffer, " GenLevel");

Comparing dig1 and dig3 bitmask looks strange.
For clarity, better to have
	unsigned char dig3;
	...
	dig3 = dig1 >> 16;
	if (dig3 & AC_DIG3_KAE)
		snd_iprintf(buffer, " KAE");
	...
	snd_iprintf(buffer, "  IEC Coding Type: 0x%x\n",
			dig3 & AC_DIG3_ICT);


Takashi

  parent reply	other threads:[~2012-08-13  7:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13  6:11 [PATCH 1/3] ALSA: hda - show ICT/KAE control bits Wang Xingchao
2012-08-13  6:11 ` [PATCH 2/3] ALSA: hda - fix Copyright debug message Wang Xingchao
2012-08-13  8:06   ` Takashi Iwai
2012-08-13  6:11 ` [PATCH 3/3] ALSA: hda - Disable DigEn bit before stream-id change Wang Xingchao
2012-08-13  7:32   ` Takashi Iwai
2012-08-13  7:37     ` Wang, Xingchao
2012-08-13  7:51       ` Takashi Iwai
2012-08-13  8:05         ` Takashi Iwai
2012-08-13  8:11           ` Wang, Xingchao
2012-08-13  7:38 ` Takashi Iwai [this message]
2012-08-13  7:49   ` [PATCH 1/3] ALSA: hda - show ICT/KAE control bits Wang, Xingchao
2012-08-13  7:54     ` Takashi Iwai
2012-08-13  7:56       ` Wang, Xingchao

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=s5hr4rbw8bd.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=xingchao.wang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.