* [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
@ 2004-11-14 1:01 Lee Revell
2004-11-17 12:11 ` Takashi Iwai
0 siblings, 1 reply; 9+ messages in thread
From: Lee Revell @ 2004-11-14 1:01 UTC (permalink / raw)
To: alsa-devel
Summary: This patch adds a register dump for each voice to the /proc
entry. This functionality will be key for improving the voice allocator
for multichannel support. Currently these all go in the main file; I
can split these into a file per voice if desired.
Sample output for an idle (15) and running (16) voice:
Voice 15 PTR registers
PTR 0x0 0x0
PTR 0x1 0x0
PTR 0x2 0xffff
PTR 0x3 0xffff
PTR 0x4 0x0
PTR 0x5 0x0
PTR 0x6 0x0
PTR 0x7 0x10
PTR 0x8 0x0
PTR 0x9 0x400000
PTR 0xa 0x32101000
PTR 0xb 0x32101000
PTR 0xc 0x31d3fff
PTR 0xd 0x31d3fff
PTR 0xe 0x33ea901
PTR 0xf 0x33ea901
PTR 0x10 0x0
PTR 0x11 0x0
PTR 0x12 0x0
PTR 0x13 0x0
PTR 0x14 0x0
PTR 0x15 0x0
PTR 0x16 0x0
PTR 0x17 0x0
PTR 0x18 0x0
PTR 0x19 0xffff
PTR 0x1a 0x0
PTR 0x1b 0x0
PTR 0x1c 0x18
PTR 0x1d 0x18
PTR 0x1e 0x0
PTR 0x1f 0x0
PTR 0x20 0x0
PTR 0x21 0x0
PTR 0x22 0x0
PTR 0x23 0x0
PTR 0x24 0x0
PTR 0x25 0x0
PTR 0x26 0x0
PTR 0x27 0x0
PTR 0x28 0x0
PTR 0x29 0x0
PTR 0x2a 0x0
PTR 0x2b 0x0
PTR 0x2c 0x0
PTR 0x2d 0x0
PTR 0x2e 0x0
PTR 0x2f 0x0
PTR 0x30 0x0
PTR 0x31 0x0
PTR 0x32 0x0
PTR 0x33 0x0
PTR 0x34 0x0
PTR 0x35 0x0
PTR 0x36 0x0
PTR 0x37 0x0
PTR 0x38 0x0
PTR 0x39 0x0
PTR 0x3a 0x0
PTR 0x3b 0x0
PTR 0x3c 0x0
PTR 0x3d 0x0
PTR 0x3e 0x0
PTR 0x3f 0x0
Voice 16 PTR registers
PTR 0x0 0x3acdbe58
PTR 0x1 0x3acdff00
PTR 0x2 0xffffffff
PTR 0x3 0xffffffff
PTR 0x4 0xaf00
PTR 0x5 0xff00
PTR 0x6 0x400
PTR 0x7 0x4400
PTR 0x8 0x2002521
PTR 0x9 0x2e91000
PTR 0xa 0x32104400
PTR 0xb 0x32104400
PTR 0xc 0x63f4009
PTR 0xd 0x31d3fff
PTR 0xe 0x73ea901
PTR 0xf 0x73ea901
PTR 0x10 0x0
PTR 0x11 0x7f7f
PTR 0x12 0x7f7f
PTR 0x13 0x8000
PTR 0x14 0x8000
PTR 0x15 0x0
PTR 0x16 0x7f
PTR 0x17 0x8000
PTR 0x18 0xde0b
PTR 0x19 0xff
PTR 0x1a 0x7f
PTR 0x1b 0x0
PTR 0x1c 0x0
PTR 0x1d 0x0
PTR 0x1e 0x0
PTR 0x1f 0x0
PTR 0x20 0x2d002d
PTR 0x21 0x220022
PTR 0x22 0x2f002f
PTR 0x23 0x2f002f
PTR 0x24 0x2d002d
PTR 0x25 0x2a002a
PTR 0x26 0x270027
PTR 0x27 0x170017
PTR 0x28 0x2f002f
PTR 0x29 0x2a002a
PTR 0x2a 0x2d002d
PTR 0x2b 0x2d002d
PTR 0x2c 0x2f002f
PTR 0x2d 0x270027
PTR 0x2e 0x2d002d
PTR 0x2f 0x320032
PTR 0x30 0x2d002d
PTR 0x31 0x220022
PTR 0x32 0x2f002f
PTR 0x33 0x2f002f
PTR 0x34 0x2d002d
PTR 0x35 0x2a002a
PTR 0x36 0x270027
PTR 0x37 0x170017
PTR 0x38 0x2f002f
PTR 0x39 0x2a002a
PTR 0x3a 0x2d002d
PTR 0x3b 0x2d002d
PTR 0x3c 0x2f002f
PTR 0x3d 0x270027
PTR 0x3e 0x2d002d
PTR 0x3f 0x320032
Signed-Off-By: Lee Revell <rlrevell@joe-job.com>
Index: alsa-kernel/pci/emu10k1/emuproc.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emuproc.c,v
retrieving revision 1.21
diff -u -r1.21 emuproc.c
--- alsa-kernel/pci/emu10k1/emuproc.c 6 Sep 2004 15:05:19 -0000 1.21
+++ alsa-kernel/pci/emu10k1/emuproc.c 14 Nov 2004 00:54:45 -0000
@@ -178,7 +178,7 @@
unsigned int val;
int nefx = emu->audigy ? 64 : 32;
char **outputs = emu->audigy ? audigy_outs : creative_outs;
- int idx;
+ int idx, reg;
snd_iprintf(buffer, "EMU10K1\n\n");
val = emu->audigy ?
@@ -219,6 +219,17 @@
snd_iprintf(buffer, "\nZoomed Video\n");
snd_iprintf(buffer, "Rate Locked : %s\n", val & SRCS_RATELOCKED ? "on" : "off");
snd_iprintf(buffer, "Estimated Sample Rate : 0x%x\n", val & SRCS_ESTSAMPLERATE);
+
+ // per-voice parameters
+ for (idx = 0; idx < NUM_G; idx++) {
+ snd_iprintf(buffer, "\nVoice %i PTR registers\n", idx);
+ for (reg = 0x0; reg < 0x40; reg++) {
+ snd_iprintf(buffer, "PTR 0x%x 0x%x\n",
+ reg,
+ snd_emu10k1_ptr_read(emu, reg, idx));
+ }
+ }
+
}
static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry,
@@ -318,7 +329,7 @@
snd_info_entry_t *entry;
if (! snd_card_proc_new(emu->card, "emu10k1", &entry))
- snd_info_set_text_ops(entry, emu, 1024, snd_emu10k1_proc_read);
+ snd_info_set_text_ops(entry, emu, 65536, snd_emu10k1_proc_read);
if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) {
entry->content = SNDRV_INFO_CONTENT_DATA;
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-14 1:01 [PATCH] emu10k1: add per-voice PTR register dump to /proc entry Lee Revell
@ 2004-11-17 12:11 ` Takashi Iwai
2004-11-17 16:31 ` Lee Revell
2004-11-17 17:51 ` Lee Revell
0 siblings, 2 replies; 9+ messages in thread
From: Takashi Iwai @ 2004-11-17 12:11 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel
At Sat, 13 Nov 2004 20:01:26 -0500,
Lee Revell wrote:
>
> Summary: This patch adds a register dump for each voice to the /proc
> entry. This functionality will be key for improving the voice allocator
> for multichannel support. Currently these all go in the main file; I
> can split these into a file per voice if desired.
I feel it'd be better to create another proc file. Not necessarily
per voice, though. The dump seems not matching with the current
emu10k1 proc file contents.
Also, could you use tab for indentation?
thanks,
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-17 12:11 ` Takashi Iwai
@ 2004-11-17 16:31 ` Lee Revell
2004-11-18 13:22 ` Takashi Iwai
2004-11-17 17:51 ` Lee Revell
1 sibling, 1 reply; 9+ messages in thread
From: Lee Revell @ 2004-11-17 16:31 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, James Courtier-Dutton
On Wed, 2004-11-17 at 13:11 +0100, Takashi Iwai wrote:
> At Sat, 13 Nov 2004 20:01:26 -0500,
> Lee Revell wrote:
> >
> > Summary: This patch adds a register dump for each voice to the /proc
> > entry. This functionality will be key for improving the voice allocator
> > for multichannel support. Currently these all go in the main file; I
> > can split these into a file per voice if desired.
>
> I feel it'd be better to create another proc file. Not necessarily
> per voice, though. The dump seems not matching with the current
> emu10k1 proc file contents.
>
Sure, will do. One file per voice for the PTR registers (and one file
for FN0) might actually be most useful. This way you can diff them.
> Also, could you use tab for indentation?
>
No problem, I will update my editor settings.
Also, James, I forgot you were the emu10k1 maintainer, I will cc: you on
future patches.
Lee
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-17 12:11 ` Takashi Iwai
2004-11-17 16:31 ` Lee Revell
@ 2004-11-17 17:51 ` Lee Revell
2004-11-18 13:21 ` Takashi Iwai
1 sibling, 1 reply; 9+ messages in thread
From: Lee Revell @ 2004-11-17 17:51 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Wed, 2004-11-17 at 13:11 +0100, Takashi Iwai wrote:
> At Sat, 13 Nov 2004 20:01:26 -0500,
> Lee Revell wrote:
> >
> > Summary: This patch adds a register dump for each voice to the /proc
> > entry. This functionality will be key for improving the voice allocator
> > for multichannel support. Currently these all go in the main file; I
> > can split these into a file per voice if desired.
>
> I feel it'd be better to create another proc file. Not necessarily
> per voice, though. The dump seems not matching with the current
> emu10k1 proc file contents.
>
Hey, it looks like if I write routines to dump all registers, then
suspend/resume is halfway finished, right?
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=227
Lee
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-17 17:51 ` Lee Revell
@ 2004-11-18 13:21 ` Takashi Iwai
0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2004-11-18 13:21 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel
At Wed, 17 Nov 2004 12:51:29 -0500,
Lee Revell wrote:
>
> On Wed, 2004-11-17 at 13:11 +0100, Takashi Iwai wrote:
> > At Sat, 13 Nov 2004 20:01:26 -0500,
> > Lee Revell wrote:
> > >
> > > Summary: This patch adds a register dump for each voice to the /proc
> > > entry. This functionality will be key for improving the voice allocator
> > > for multichannel support. Currently these all go in the main file; I
> > > can split these into a file per voice if desired.
> >
> > I feel it'd be better to create another proc file. Not necessarily
> > per voice, though. The dump seems not matching with the current
> > emu10k1 proc file contents.
> >
>
> Hey, it looks like if I write routines to dump all registers, then
> suspend/resume is halfway finished, right?
>
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=227
Well, yes, halfway :)
We should call snd_pcm_suspend_all() to suspend the PCM streams, then
save the necessary registers, and stop the hardware.
In the resume, start the hardware, restore the registers, resume the
mixer (e.g. call snd_ac97_resume()).
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-17 16:31 ` Lee Revell
@ 2004-11-18 13:22 ` Takashi Iwai
2004-11-19 22:38 ` Lee Revell
2004-11-20 0:10 ` Lee Revell
0 siblings, 2 replies; 9+ messages in thread
From: Takashi Iwai @ 2004-11-18 13:22 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel, James Courtier-Dutton
At Wed, 17 Nov 2004 11:31:01 -0500,
Lee Revell wrote:
>
> On Wed, 2004-11-17 at 13:11 +0100, Takashi Iwai wrote:
> > At Sat, 13 Nov 2004 20:01:26 -0500,
> > Lee Revell wrote:
> > >
> > > Summary: This patch adds a register dump for each voice to the /proc
> > > entry. This functionality will be key for improving the voice allocator
> > > for multichannel support. Currently these all go in the main file; I
> > > can split these into a file per voice if desired.
> >
> > I feel it'd be better to create another proc file. Not necessarily
> > per voice, though. The dump seems not matching with the current
> > emu10k1 proc file contents.
> >
>
> Sure, will do. One file per voice for the PTR registers (and one file
> for FN0) might actually be most useful. This way you can diff them.
Yes, that makes sense.
> > Also, could you use tab for indentation?
> >
>
> No problem, I will update my editor settings.
Thanks.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-18 13:22 ` Takashi Iwai
@ 2004-11-19 22:38 ` Lee Revell
2004-11-20 0:10 ` Lee Revell
1 sibling, 0 replies; 9+ messages in thread
From: Lee Revell @ 2004-11-19 22:38 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, James Courtier-Dutton
On Thu, 2004-11-18 at 14:22 +0100, Takashi Iwai wrote:
> > > I feel it'd be better to create another proc file. Not necessarily
> > > per voice, though. The dump seems not matching with the current
> > > emu10k1 proc file contents.
> > >
> >
> > Sure, will do. One file per voice for the PTR registers (and one file
> > for FN0) might actually be most useful. This way you can diff them.
>
> Yes, that makes sense.
How do I create a new directory under /proc/asound/my_card? Cresting a
file is easy, but I cannot find an example of a driver that creates a
directory and populates it.
Lee
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-18 13:22 ` Takashi Iwai
2004-11-19 22:38 ` Lee Revell
@ 2004-11-20 0:10 ` Lee Revell
2004-11-22 10:40 ` Takashi Iwai
1 sibling, 1 reply; 9+ messages in thread
From: Lee Revell @ 2004-11-20 0:10 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, James Courtier-Dutton
On Thu, 2004-11-18 at 14:22 +0100, Takashi Iwai wrote:
> >
> > Sure, will do. One file per voice for the PTR registers (and one file
> > for FN0) might actually be most useful. This way you can diff them.
>
> Yes, that makes sense.
>
OK regarding the previous message, I figured out how to create a
directory under the card root (just set S_IFDIR). However there is no
way to create files under that directory because snd_card_proc_new makes
the following assumption (from alsa-kernel/core/info.c):
852 *
853 * The parent is assumed as card->proc_root.
854 *
So, I think the API has to be modified to allow a parent to be
specified.
Lee
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emu10k1: add per-voice PTR register dump to /proc entry
2004-11-20 0:10 ` Lee Revell
@ 2004-11-22 10:40 ` Takashi Iwai
0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2004-11-22 10:40 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel, James Courtier-Dutton
At Fri, 19 Nov 2004 19:10:24 -0500,
Lee Revell wrote:
>
> On Thu, 2004-11-18 at 14:22 +0100, Takashi Iwai wrote:
> > >
> > > Sure, will do. One file per voice for the PTR registers (and one file
> > > for FN0) might actually be most useful. This way you can diff them.
> >
> > Yes, that makes sense.
> >
>
> OK regarding the previous message, I figured out how to create a
> directory under the card root (just set S_IFDIR). However there is no
> way to create files under that directory because snd_card_proc_new makes
> the following assumption (from alsa-kernel/core/info.c):
>
> 852 *
> 853 * The parent is assumed as card->proc_root.
> 854 *
>
> So, I think the API has to be modified to allow a parent to be
> specified.
snd_card_proc_new() is just a helper function.
When creating a subdirectory and files under it, you have to manage
the instaces by yourself (i.e. requires a proper destructor).
An example is found in pci/ac97/ac97_proc.c.
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-11-22 10:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-14 1:01 [PATCH] emu10k1: add per-voice PTR register dump to /proc entry Lee Revell
2004-11-17 12:11 ` Takashi Iwai
2004-11-17 16:31 ` Lee Revell
2004-11-18 13:22 ` Takashi Iwai
2004-11-19 22:38 ` Lee Revell
2004-11-20 0:10 ` Lee Revell
2004-11-22 10:40 ` Takashi Iwai
2004-11-17 17:51 ` Lee Revell
2004-11-18 13:21 ` Takashi Iwai
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.