Update of /cvsroot/alsa/alsa-kernel/pci/rme9652
In directory sc8-pr-cvs1:/tmp/cvs-serv23391

Modified Files:
        hdsp.c 
Log Message:
Thomas Charbonnel <[EMAIL PROTECTED]>:

The attached patch at last fixes the long lasting firmware loading error 
after boot, and includes a small cosmetic fix for H9632 cards (fixes 
SPDIF external rate reporting in /proc/asound/cardX/hdsp and amixer 
outputs).


Index: hdsp.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/rme9652/hdsp.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- hdsp.c      7 Nov 2003 18:25:54 -0000       1.47
+++ hdsp.c      7 Nov 2003 18:42:59 -0000       1.48
@@ -694,6 +694,13 @@
                                return -EIO;
                        }
                }
+
+               if ((1000 / HZ) < 3000) {
+                       set_current_state(TASK_UNINTERRUPTIBLE);
+                       schedule_timeout((3000 * HZ + 999) / 1000);
+               } else {
+                       mdelay(3000);
+               }
                
                if (hdsp_fifo_wait (hdsp, 0, HDSP_LONG_WAIT)) {
                        snd_printk ("timeout at end of firmware loading\n");
@@ -708,12 +715,6 @@
                hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register);
                snd_printk ("finished firmware loading\n");
                
-               if ((1000 / HZ) < 3000) {
-                       set_current_state(TASK_UNINTERRUPTIBLE);
-                       schedule_timeout((3000 * HZ + 999) / 1000);
-               } else {
-                       mdelay(3000);
-               }
        }
        if (hdsp->state & HDSP_InitializationComplete) {
                snd_printk("firmware loaded from cache, restoring defaults\n");
@@ -1882,10 +1883,12 @@
 
 static int snd_hdsp_info_spdif_sample_rate(snd_kcontrol_t *kcontrol, 
snd_ctl_elem_info_t * uinfo)
 {
-       static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", 
"None"};
+       static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", 
"None", "128000", "176400", "192000"};
+       hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol);
+
        uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
        uinfo->count = 1;
-       uinfo->value.enumerated.items = 7 ;
+       uinfo->value.enumerated.items = (hdsp->io_type == H9632) ? 10 : 7;
        if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
                uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
        strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
@@ -1915,6 +1918,15 @@
        case 96000:
                ucontrol->value.enumerated.item[0] = 5;
                break;
+       case 128000:
+               ucontrol->value.enumerated.item[0] = 7;
+               break;
+       case 176400:
+               ucontrol->value.enumerated.item[0] = 8;
+               break;
+       case 192000:
+               ucontrol->value.enumerated.item[0] = 9;
+               break;
        default:
                ucontrol->value.enumerated.item[0] = 6;         
        }
@@ -3534,7 +3546,7 @@
                        tmp = "-12 dB";
                        break;
                }
-               snd_iprintf(buffer, "Phone Gain : %s\n", tmp);
+               snd_iprintf(buffer, "Phones Gain : %s\n", tmp);
 
                snd_iprintf(buffer, "XLR Breakout Cable : %s\n", 
hdsp_xlr_breakout_cable(hdsp) ? "yes" : "no"); 
                



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to