Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv3064/alsa-kernel/core

Modified Files:
        hwdep.c info_oss.c init.c memory.c pcm.c rawmidi.c sound.c 
        sound_oss.c timer.c 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: hwdep.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/hwdep.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- hwdep.c     21 Oct 2003 09:52:46 -0000      1.23
+++ hwdep.c     23 Oct 2003 14:34:52 -0000      1.24
@@ -487,7 +487,6 @@
 
        memset(snd_hwdep_devices, 0, sizeof(snd_hwdep_devices));
        if ((entry = snd_info_create_module_entry(THIS_MODULE, "hwdep", NULL)) != 
NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->c.text.read_size = 512;
                entry->c.text.read = snd_hwdep_proc_read;
                if (snd_info_register(entry) < 0) {

Index: info_oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/info_oss.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- info_oss.c  13 Oct 2002 13:16:38 -0000      1.9
+++ info_oss.c  23 Oct 2003 14:34:52 -0000      1.10
@@ -114,7 +114,6 @@
 
        memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings));
        if ((entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", 
snd_oss_root)) != NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->c.text.read_size = 2048;
                entry->c.text.read = snd_sndstat_proc_read;
                if (snd_info_register(entry) < 0) {

Index: init.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- init.c      30 Sep 2003 09:28:26 -0000      1.39
+++ init.c      23 Oct 2003 14:34:52 -0000      1.40
@@ -442,7 +442,6 @@
                snd_printd("unable to create card entry\n");
                goto __skip_info;
        }
-       entry->content = SNDRV_INFO_CONTENT_TEXT;
        entry->c.text.read_size = PAGE_SIZE;
        entry->c.text.read = snd_card_id_read;
        if (snd_info_register(entry) < 0) {
@@ -527,7 +526,6 @@
 
        entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL);
        snd_runtime_check(entry != NULL, return -ENOMEM);
-       entry->content = SNDRV_INFO_CONTENT_TEXT;
        entry->c.text.read_size = PAGE_SIZE;
        entry->c.text.read = snd_card_info_read;
        if (snd_info_register(entry) < 0) {
@@ -539,7 +537,6 @@
 #ifdef MODULE
        entry = snd_info_create_module_entry(THIS_MODULE, "modules", NULL);
        if (entry) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->c.text.read_size = PAGE_SIZE;
                entry->c.text.read = snd_card_module_info_read;
                if (snd_info_register(entry) < 0)

Index: memory.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/memory.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- memory.c    28 Feb 2003 14:29:17 -0000      1.26
+++ memory.c    23 Oct 2003 14:34:52 -0000      1.27
@@ -231,7 +231,6 @@
 
        entry = snd_info_create_module_entry(THIS_MODULE, "meminfo", NULL);
        if (entry) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->c.text.read_size = 256;
                entry->c.text.read = snd_memory_info_read;
                if (snd_info_register(entry) < 0) {

Index: pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/pcm.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- pcm.c       20 Oct 2003 15:28:38 -0000      1.33
+++ pcm.c       23 Oct 2003 14:34:52 -0000      1.34
@@ -407,11 +407,7 @@
        pstr->proc_root = entry;
 
        if ((entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root)) 
!= NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->mode = S_IFREG | S_IRUGO;
-               entry->c.text.read_size = 256;
-               entry->c.text.read = snd_pcm_stream_proc_info_read;
-               entry->private_data = pstr;
+               snd_info_set_text_ops(entry, pstr, 256, snd_pcm_stream_proc_info_read);
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;
@@ -454,11 +450,7 @@
        substream->proc_root = entry;
 
        if ((entry = snd_info_create_card_entry(card, "info", substream->proc_root)) 
!= NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->mode = S_IFREG | S_IRUGO;
-               entry->c.text.read_size = 256;
-               entry->c.text.read = snd_pcm_substream_proc_info_read;
-               entry->private_data = substream;
+               snd_info_set_text_ops(entry, substream, 256, 
snd_pcm_substream_proc_info_read);
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;
@@ -467,11 +459,7 @@
        substream->proc_info_entry = entry;
 
        if ((entry = snd_info_create_card_entry(card, "hw_params", 
substream->proc_root)) != NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->mode = S_IFREG | S_IRUGO;
-               entry->c.text.read_size = 256;
-               entry->c.text.read = snd_pcm_substream_proc_hw_params_read;
-               entry->private_data = substream;
+               snd_info_set_text_ops(entry, substream, 256, 
snd_pcm_substream_proc_hw_params_read);
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;
@@ -480,11 +468,7 @@
        substream->proc_hw_params_entry = entry;
 
        if ((entry = snd_info_create_card_entry(card, "sw_params", 
substream->proc_root)) != NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->mode = S_IFREG | S_IRUGO;
-               entry->c.text.read_size = 256;
-               entry->c.text.read = snd_pcm_substream_proc_sw_params_read;
-               entry->private_data = substream;
+               snd_info_set_text_ops(entry, substream, 256, 
snd_pcm_substream_proc_sw_params_read);
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;
@@ -493,11 +477,7 @@
        substream->proc_sw_params_entry = entry;
 
        if ((entry = snd_info_create_card_entry(card, "status", substream->proc_root)) 
!= NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->mode = S_IFREG | S_IRUGO;
-               entry->c.text.read_size = 256;
-               entry->c.text.read = snd_pcm_substream_proc_status_read;
-               entry->private_data = substream;
+               snd_info_set_text_ops(entry, substream, 256, 
snd_pcm_substream_proc_status_read);
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;
@@ -512,23 +492,23 @@
 {
        if (substream->proc_info_entry) {
                snd_info_unregister(substream->proc_info_entry);
-               substream->proc_info_entry = 0;
+               substream->proc_info_entry = NULL;
        }
        if (substream->proc_hw_params_entry) {
                snd_info_unregister(substream->proc_hw_params_entry);
-               substream->proc_hw_params_entry = 0;
+               substream->proc_hw_params_entry = NULL;
        }
        if (substream->proc_sw_params_entry) {
                snd_info_unregister(substream->proc_sw_params_entry);
-               substream->proc_sw_params_entry = 0;
+               substream->proc_sw_params_entry = NULL;
        }
        if (substream->proc_status_entry) {
                snd_info_unregister(substream->proc_status_entry);
-               substream->proc_status_entry = 0;
+               substream->proc_status_entry = NULL;
        }
        if (substream->proc_root) {
                snd_info_unregister(substream->proc_root);
-               substream->proc_root = 0;
+               substream->proc_root = NULL;
        }
        return 0;
 }
@@ -981,9 +961,7 @@
 
        snd_ctl_register_ioctl(snd_pcm_control_ioctl);
        if ((entry = snd_info_create_module_entry(THIS_MODULE, "pcm", NULL)) != NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->c.text.read_size = SNDRV_CARDS * SNDRV_PCM_DEVICES * 128;
-               entry->c.text.read = snd_pcm_proc_read;
+               snd_info_set_text_ops(entry, NULL, SNDRV_CARDS * SNDRV_PCM_DEVICES * 
128, snd_pcm_proc_read);
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;

Index: rawmidi.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/rawmidi.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- rawmidi.c   30 Sep 2003 10:15:44 -0000      1.39
+++ rawmidi.c   23 Oct 2003 14:34:52 -0000      1.40
@@ -1507,7 +1507,6 @@
        sprintf(name, "midi%d", rmidi->device);
        entry = snd_info_create_card_entry(rmidi->card, name, rmidi->card->proc_root);
        if (entry) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = rmidi;
                entry->c.text.read_size = 1024;
                entry->c.text.read = snd_rawmidi_proc_info_read;

Index: sound.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/sound.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- sound.c     7 Oct 2003 12:12:19 -0000       1.50
+++ sound.c     23 Oct 2003 14:34:52 -0000      1.51
@@ -299,7 +299,6 @@
 
        entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL);
        if (entry) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->c.text.read_size = PAGE_SIZE;
                entry->c.text.read = snd_minor_info_read;
                if (snd_info_register(entry) < 0) {

Index: sound_oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/sound_oss.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sound_oss.c 21 Jun 2003 07:52:37 -0000      1.10
+++ sound_oss.c 23 Oct 2003 14:34:52 -0000      1.11
@@ -217,7 +217,6 @@
 
        entry = snd_info_create_module_entry(THIS_MODULE, "devices", snd_oss_root);
        if (entry) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->c.text.read_size = PAGE_SIZE;
                entry->c.text.read = snd_minor_info_oss_read;
                if (snd_info_register(entry) < 0) {

Index: timer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/timer.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- timer.c     20 Oct 2003 15:25:32 -0000      1.51
+++ timer.c     23 Oct 2003 14:34:52 -0000      1.52
@@ -1784,7 +1784,6 @@
        snd_oss_info_register(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1, "system 
timer");
 #endif
        if ((entry = snd_info_create_module_entry(THIS_MODULE, "timers", NULL)) != 
NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->c.text.read_size = SNDRV_TIMER_DEVICES * 128;
                entry->c.text.read = snd_timer_proc_read;
                if (snd_info_register(entry) < 0) {



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to