All of lore.kernel.org
 help / color / mirror / Atom feed
* hdsp firmware loading fix + 9632 cosmetic fix
@ 2003-11-07 14:10 Thomas Charbonnel
  2003-11-07 18:43 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Charbonnel @ 2003-11-07 14:10 UTC (permalink / raw)
  To: alsa-devel

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

Hi,

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).
It should be applied on top of the last patch I sent to the list.

Thomas

[-- Attachment #2: firmware_loading.patch --]
[-- Type: text/plain, Size: 2229 bytes --]

--- hdsp.c.cvs	2003-11-06 13:06:28.000000000 +0100
+++ hdsp.c	2003-11-07 14:49:56.000000000 +0100
@@ -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");	
 		

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-07 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-07 14:10 hdsp firmware loading fix + 9632 cosmetic fix Thomas Charbonnel
2003-11-07 18:43 ` 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.