All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: [PATCH] Fix revision display from cat /proc/asound/card0/ac97#0
Date: Fri, 03 Oct 2003 17:00:42 +0100	[thread overview]
Message-ID: <3F7D9D2A.5030103@superbug.demon.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

This patch fixes the display of revision number for ALC650 AC97 chip.
"alsamixer"
displayed the correct revision, but
"cat /proc/asound/card0/ac97#0"
did not.

Cheers
James

[-- Attachment #2: ac97_proc-rev-fix.diff --]
[-- Type: text/plain, Size: 929 bytes --]

--- ac97_proc.c.org	2003-10-03 16:07:16.578344016 +0100
+++ ac97_proc.c	2003-10-03 16:56:14.184759960 +0100
@@ -37,15 +37,12 @@
 static void snd_ac97_proc_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int subidx)
 {
 	char name[64];
-	unsigned int id;
 	unsigned short val, tmp, ext, mext;
 	static const char *spdif_slots[4] = { " SPDIF=3/4", " SPDIF=7/8", " SPDIF=6/9", " SPDIF=res" };
 	static const char *spdif_rates[4] = { " Rate=44.1kHz", " Rate=res", " Rate=48kHz", " Rate=32kHz" };
 	static const char *spdif_rates_cs4205[4] = { " Rate=48kHz", " Rate=44.1kHz", " Rate=res", " Rate=res" };
 
-	id = snd_ac97_read(ac97, AC97_VENDOR_ID1) << 16;
-	id |= snd_ac97_read(ac97, AC97_VENDOR_ID2);
-	snd_ac97_get_name(NULL, id, name, 0);
+	snd_ac97_get_name(NULL, ac97->id, name, 0);
 	snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name);
 	if ((ac97->scaps & AC97_SCAP_AUDIO) == 0)
 		goto __modem;

             reply	other threads:[~2003-10-03 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03 16:00 James Courtier-Dutton [this message]
2003-10-06 10:55 ` [PATCH] Fix revision display from cat /proc/asound/card0/ac97#0 Takashi Iwai

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=3F7D9D2A.5030103@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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.