All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <wfg@linux.intel.com>
To: Shane W <shane-intel@csy.ca>, Takashi Iwai <tiwai@suse.de>
Cc: "Ma, Ling" <ling.ma@intel.com>,
	"Fu, Michael" <michael.fu@intel.com>,
	alsa-devel <alsa-devel@alsa-project.org>,
	intel-gfx@lists.freedesktop.org, xorg@lists.freedesktop.org
Subject: [PATCH] properly print ELD sample bits
Date: Fri, 21 Nov 2008 09:42:59 +0800	[thread overview]
Message-ID: <20081121014259.GA10607@localhost> (raw)
In-Reply-To: <20081121013655.GA8992@localhost>

Fix bugs on printing the ELD sample bits.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
 sound/pci/hda/hda_eld.c  |    2 +-
 sound/pci/hda/hda_proc.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

--- sound-2.6.orig/sound/pci/hda/hda_eld.c
+++ sound-2.6/sound/pci/hda/hda_eld.c
@@ -397,7 +397,7 @@ static void hdmi_show_short_audio_desc(s
 	snd_print_pcm_rates(a->rates, buf, sizeof(buf));
 
 	if (a->format == AUDIO_CODING_TYPE_LPCM)
-		snd_print_pcm_rates(a->sample_bits, buf2 + 8, sizeof(buf2 - 8));
+		snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2 - 8));
 	else if (a->max_bitrate)
 		snprintf(buf2, sizeof(buf2),
 				", max bitrate = %d", a->max_bitrate);
--- sound-2.6.orig/sound/pci/hda/hda_proc.c
+++ sound-2.6/sound/pci/hda/hda_proc.c
@@ -120,7 +120,7 @@ void snd_print_pcm_bits(int pcm, char *b
 	int i, j;
 
 	for (i = 0, j = 0; i < ARRAY_SIZE(bits); i++)
-		if (pcm & (1 << i))
+		if (pcm & (AC_SUPPCM_BITS_8 << i))
 			j += snprintf(buf + j, buflen - j,  " %d", bits[i]);
 
 	buf[j] = '\0'; /* necessary when j == 0 */
@@ -130,7 +130,6 @@ static void print_pcm_bits(struct snd_in
 {
 	char buf[SND_PRINT_BITS_ADVISED_BUFSIZE];
 
-	pcm = (pcm >> 16) & 0xff;
 	snd_iprintf(buffer, "    bits [0x%x]:", pcm);
 	snd_print_pcm_bits(pcm, buf, sizeof(buf));
 	snd_iprintf(buffer, "%s\n", buf);

  reply	other threads:[~2008-11-21  1:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13  2:21 [RFC][PATCH] ELD routines and proc interface Wu Fengguang
2008-11-13  7:26 ` Takashi Iwai
2008-11-14  1:34   ` Wu Fengguang
2008-11-14  7:25     ` Takashi Iwai
2008-11-14  7:38       ` Wu Fengguang
2008-11-14  7:43         ` Takashi Iwai
2008-11-14  7:47           ` Wu Fengguang
2008-11-14  7:50             ` Takashi Iwai
2008-11-14  8:02               ` Wu Fengguang
     [not found] ` <20081119071135.GA17733@csy.ca>
2008-11-19  7:17   ` Wu Fengguang
     [not found]     ` <20081119075545.GA19833@csy.ca>
2008-11-19  8:08       ` Wu Fengguang
2008-11-19  9:39         ` [alsa-devel] " Wu Fengguang
     [not found]           ` <20081119200201.GA23246@csy.ca>
     [not found]             ` <20081120010204.GA25454@localhost>
     [not found]               ` <20081120200606.GA4164@csy.ca>
2008-11-21  1:36                 ` Wu Fengguang
2008-11-21  1:42                   ` Wu Fengguang [this message]
2008-11-21  7:41                     ` [PATCH] properly print ELD sample bits Takashi Iwai
     [not found]                   ` <20081121014649.GA12072@csy.ca>
2008-11-21  1:59                     ` [Intel-gfx] [RFC][PATCH] ELD routines and proc interface Wu Fengguang
2008-11-21  3:41                     ` Wu Fengguang
2008-11-21  7:44                       ` Takashi Iwai
2008-11-21  7:47                         ` Wu Fengguang

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=20081121014259.GA10607@localhost \
    --to=wfg@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ling.ma@intel.com \
    --cc=michael.fu@intel.com \
    --cc=shane-intel@csy.ca \
    --cc=tiwai@suse.de \
    --cc=xorg@lists.freedesktop.org \
    /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.