Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Charbonnel <thomas@undata.org>
To: alsa-devel@lists.sourceforge.net
Subject: hdsp firmware loading fix + 9632 cosmetic fix
Date: Fri, 07 Nov 2003 15:10:56 +0100	[thread overview]
Message-ID: <3FABA7F0.9080701@undata.org> (raw)

[-- 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");	
 		

             reply	other threads:[~2003-11-07 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-07 14:10 Thomas Charbonnel [this message]
2003-11-07 18:43 ` hdsp firmware loading fix + 9632 cosmetic fix Takashi Iwai

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=3FABA7F0.9080701@undata.org \
    --to=thomas@undata.org \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox