From: Pavel Hofman <pavel.hofman@insite.cz>
To: Takashi Iwai <tiwai@suse.de>,
ALSA development <alsa-devel@alsa-project.org>
Subject: AK4114 - listing regs in proc - PATCH
Date: Sun, 10 Feb 2008 21:17:08 +0100 [thread overview]
Message-ID: <47AF5BC4.9000702@insite.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0802070440430.9968@shell4.speakeasy.net>
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
Hello,
please find enclosed a simple patch for listing AK4114 regs in proc.
Thanks a lot.
Pavel Hofman.
Signed-off-by: Pavel Hofman <dustin@seznam.cz>
[-- Attachment #2: patch-ak4114.diff --]
[-- Type: text/x-patch, Size: 1432 bytes --]
diff -r b0d97ac73e0f i2c/other/ak4114.c
--- a/i2c/other/ak4114.c Fri Jan 25 15:24:50 2008 +0100
+++ b/i2c/other/ak4114.c Sun Feb 10 21:06:38 2008 +0100
@@ -27,6 +27,7 @@
#include <sound/pcm.h>
#include <sound/ak4114.h>
#include <sound/asoundef.h>
+#include <sound/info.h>
MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
MODULE_DESCRIPTION("AK4114 IEC958 (S/PDIF) receiver by Asahi Kasei");
@@ -445,6 +446,26 @@ static struct snd_kcontrol_new snd_ak411
.private_value = (1<<31) | (4<<8) | AK4114_REG_RCS0,
}
};
+
+
+static void snd_ak4114_proc_regs_read(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer)
+{
+ struct ak4114 *ak4114 = (struct ak4114 *)entry->private_data;
+ int reg, val;
+ /* all ak4114 registers 0x00 - 0x1f */
+ for (reg = 0; reg < 0x20; reg++) {
+ val = reg_read(ak4114, reg);
+ snd_iprintf(buffer, "0x%02x = 0x%02x\n", reg, val);
+ }
+}
+
+static void snd_ak4114_proc_init(struct ak4114 *ak4114)
+{
+ struct snd_info_entry *entry;
+ if (!snd_card_proc_new(ak4114->card, "ak4114", &entry))
+ snd_info_set_text_ops(entry, ak4114, snd_ak4114_proc_regs_read);
+}
int snd_ak4114_build(struct ak4114 *ak4114,
struct snd_pcm_substream *ply_substream,
@@ -478,6 +499,7 @@ int snd_ak4114_build(struct ak4114 *ak41
return err;
ak4114->kctls[idx] = kctl;
}
+ snd_ak4114_proc_init(ak4114);
/* trigger workq */
schedule_delayed_work(&ak4114->work, HZ / 10);
return 0;
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2008-02-10 20:17 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 9:37 HG vs GIT Jaroslav Kysela
2008-02-07 11:27 ` Takashi Iwai
2008-02-07 11:45 ` Andrew Paprocki
2008-02-07 12:03 ` Takashi Iwai
2008-02-07 12:19 ` Jaroslav Kysela
2008-02-07 15:13 ` Takashi Iwai
2008-02-07 13:10 ` Trent Piepho
2008-02-07 13:26 ` Takashi Iwai
2008-02-07 13:41 ` Trent Piepho
2008-02-07 13:48 ` Takashi Iwai
2008-02-07 13:52 ` Jaroslav Kysela
2008-02-07 14:05 ` Takashi Iwai
2008-02-07 14:07 ` Jaroslav Kysela
2008-02-07 15:49 ` Trent Piepho
2008-02-07 16:03 ` Takashi Iwai
2008-02-07 19:46 ` Mark Brown
2008-02-07 20:36 ` Takashi Iwai
2008-02-08 0:42 ` Mark Brown
2008-02-08 1:09 ` Tobin Davis
2008-02-07 14:49 ` Tobin Davis
2008-02-07 15:00 ` Mark Brown
2008-02-07 15:18 ` Takashi Iwai
2008-02-07 16:03 ` Trent Piepho
2008-02-07 19:27 ` Mark Brown
2008-02-10 20:17 ` Pavel Hofman [this message]
2008-02-11 13:47 ` AK4114 - listing regs in proc - PATCH Takashi Iwai
2008-02-07 15:22 ` HG vs GIT Timur Tabi
2008-02-07 16:09 ` Takashi Iwai
2008-02-07 12:03 ` Jaroslav Kysela
2008-02-07 21:14 ` Rene Herman
2008-02-07 11:39 ` Mark Brown
2008-02-07 13:06 ` James Courtier-Dutton
2008-02-07 15:20 ` Timur Tabi
2008-02-07 15:53 ` Clemens Ladisch
2008-02-07 21:12 ` Rene Herman
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=47AF5BC4.9000702@insite.cz \
--to=pavel.hofman@insite.cz \
--cc=alsa-devel@alsa-project.org \
--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 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.