All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: hdsp update
  2003-11-06 12:37 hdsp9632 mixer fix + gcc 2.9x compile fix Thomas Charbonnel
@ 2003-11-07 11:18 ` Benouille
  2003-11-07 12:55   ` Thomas Charbonnel
  0 siblings, 1 reply; 9+ messages in thread
From: Benouille @ 2003-11-07 11:18 UTC (permalink / raw)
  To: alsa-devel

Hi list, hi thomas,

A big thank you for all your great job on the rme hdsp.
I've installed the alsa cvs dated from the november 5th on 2 pc:
one with a hdsp multiface, one with a hdsp 9652.

Since this update, I can't access anymore the level of the channels with
amixer, and alsamixer reponds 'no mixer element found' on both system.
Is it a normal behaviour?

Then, when I boot, the hdsp multiface is still locked and I need to call
'hdsploader' about 3 or 5 times (I have the 'post-install snd-hdsp
/usr/local/bin/hdsploader' in modules.conf)
then, I have to reboot, and run hdspmixer to unmute the channels.
I woul like to know if there is a way to start the system with the card
properly running and all channels unmuted.
Maybe you could show us your modules.conf?

Thanks again,

Benoit



Le 06/11/2003 13:37, Thomas Charbonnel a écrit :
> Hi,
> 
> The attached patch fixes matrix mixer and metering problems spotted by 
> Pentti Ala-Vannesluoma for H9632 cards and gcc 2.9x compile errors 
> reported by Martin Langer.
> 
> Thomas
> 
> 
> ------------------------------------------------------------------------
> 
> --- hdsp.c.cvs	2003-11-01 09:06:45.000000000 +0100
> +++ hdsp.c	2003-11-06 13:06:28.000000000 +0100
> @@ -454,6 +454,7 @@
> ...






-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: hdsp update
  2003-11-07 11:18 ` hdsp update Benouille
@ 2003-11-07 12:55   ` Thomas Charbonnel
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Charbonnel @ 2003-11-07 12:55 UTC (permalink / raw)
  To: Benouille; +Cc: alsa-devel

Benouille wrote :

> Hi list, hi thomas,
> 
> A big thank you for all your great job on the rme hdsp.
> I've installed the alsa cvs dated from the november 5th on 2 pc:
> one with a hdsp multiface, one with a hdsp 9652.
> 
> Since this update, I can't access anymore the level of the channels with
> amixer, and alsamixer reponds 'no mixer element found' on both system.
> Is it a normal behaviour?

It is. I removed those simple mixer controls because I could find no 
proper way to deal with them while changing speed mode.
Anyway, anything you could do with those you can do either with 
hdspmixer or amixer in console mode, using the 'Mixer' ctl.

The amixer syntax is as follows :

amixer -c X cset numid=5 in,out,level

Where:
X is your alsa card number
0  <= in  < 26  : physical inputs
26 <= in  < 52  : playbacks (software outputs)
0  <= out < 26  : physical outputs
26 <= out <= 27 : line outs (phones), if any
0  <= level < 65536 : gain (65535 = +6dB, 32768 = 0dB)

(H9632 users should read :
0  <= in  < 16 : physical inputs
16 <= in  < 32 : playbacks (softwre outputs)
0  <= out < 16 : physical outputs
)

Here's an example :
amixer cset numid=5 26,0,32768
amixer cset numid=5 27,1,32768
This routes software outputs 1/2 (playback_1 and playback_2 in jack) to 
physical outputs 1/2 with a 0dB gain.
It is the same as formerly setting the level to 50% in the first 2 
alsamixer strips.

Below is a small script that does the same as the first hdspmixer preset 
(for non-h9632 cards, and assumes the hdsp card is the default one) :

#! /bin/bash

for out_left in $(seq 0 2 25);
do
let out_right=$out_left+1
let in_left=$out_left+26
let in_right=$out_right+26
amixer cset numid=5 $in_left,$out_left,32768
amixer cset numid=5 $in_left,26,32768
amixer cset numid=5 $in_right,$out_right,32768
amixer cset numid=5 $in_right,27,32768;
done;

> 
> Then, when I boot, the hdsp multiface is still locked and I need to call
> 'hdsploader' about 3 or 5 times (I have the 'post-install snd-hdsp
> /usr/local/bin/hdsploader' in modules.conf)

I know this problem, but didn't find a solution yet. For some reason the 
specified wait time isn't always respected, so even if the firmware has 
been correctly uploaded ('host' light turns off on the io box), the 
function returns too early with an error, and the initialization process 
in stopped (the alsa pcm and midi devices are not created). Running 
hdsploader a second time usually fixes this.

> then, I have to reboot, and run hdspmixer to unmute the channels.
> I woul like to know if there is a way to start the system with the card
> properly running and all channels unmuted.
> Maybe you could show us your modules.conf?
> 

I have nothing special in my modules.conf, I usually run hdsploader by 
hand. You may use the above script to set the levels up.

Thomas




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* hdsp update
@ 2003-11-23 17:21 Thomas Charbonnel
  2003-11-24 11:40 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Charbonnel @ 2003-11-23 17:21 UTC (permalink / raw)
  To: alsa-devel, torger

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

Hi,

The attach patch fixes problems with speed modes for H9632 cards (many
thanks to Pentti Ala-Vannesluoma for testing the driver and helping
finding bugs), and the AutoSync mode issue (for all cards) reported by
Anders Torger at the end of september.
A new version of hdspmixer is also available here :
http://www.undata.org/~thomas/
It is mostly a bugfix release for H9632 users.
There is also a new version of hdspconf, but it only adds a .desktop
file and a nice icon (to bring it to par with the new hdspmixer), so
Takashi, feel free not to commit this one if you don't have much time :)

Thomas


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

--- hdsp.c.cvs	2003-11-07 14:49:56.000000000 +0100
+++ hdsp.c	2003-11-21 17:15:18.000000000 +0100
@@ -1109,16 +1109,17 @@
 		rate_bits = HDSP_Frequency176_4KHz;
 		break;
 	case 192000:
-		if (current_rate != 192000) {
+		if (current_rate < 128000) {
 			reject_if_open = 1;
 		}
 		rate_bits = HDSP_Frequency192KHz;
+		break;
 	default:
 		return -EINVAL;
 	}
 
 	if (reject_if_open && (hdsp->capture_pid >= 0 || hdsp->playback_pid >= 0)) {
-		snd_printk ("cannot change between single- and double-speed mode (capture PID = %d, playback PID = %d)\n",
+		snd_printk ("cannot change speed mode (capture PID = %d, playback PID = %d)\n",
 			    hdsp->capture_pid,
 			    hdsp->playback_pid);
 		return -EBUSY;
@@ -2102,9 +2103,11 @@
 	switch (mode) {
 	case HDSP_CLOCK_SOURCE_AUTOSYNC:
 		if (hdsp_external_sample_rate(hdsp) != 0) {
-		    hdsp->control_register &= ~HDSP_ClockModeMaster;		
-		    hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register);
-		    return 0;
+		    if (!hdsp_set_rate(hdsp, hdsp_external_sample_rate(hdsp), 1)) {
+			hdsp->control_register &= ~HDSP_ClockModeMaster;		
+			hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register);
+			return 0;
+		    }
 		}
 		return -1;
 	case HDSP_CLOCK_SOURCE_INTERNAL_32KHZ:
@@ -4189,30 +4192,36 @@
 static int snd_hdsp_hw_rule_in_channels(snd_pcm_hw_params_t *params,
 					snd_pcm_hw_rule_t *rule)
 {
-	unsigned int list[2];
+	unsigned int list[3];
 	hdsp_t *hdsp = rule->private;
 	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
 	if (hdsp->io_type == H9632) {
 		list[0] = hdsp->qs_in_channels;
+		list[1] = hdsp->ds_in_channels;
+		list[2] = hdsp->ss_in_channels;
+		return snd_interval_list(c, 3, list, 0);
 	} else {
 		list[0] = hdsp->ds_in_channels;
+		list[1] = hdsp->ss_in_channels;
 	}
-	list[1] = hdsp->ss_in_channels;
 	return snd_interval_list(c, 2, list, 0);
 }
 
 static int snd_hdsp_hw_rule_out_channels(snd_pcm_hw_params_t *params,
 					snd_pcm_hw_rule_t *rule)
 {
-	unsigned int list[2];
+	unsigned int list[3];
 	hdsp_t *hdsp = rule->private;
 	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
 	if (hdsp->io_type == H9632) {
 		list[0] = hdsp->qs_out_channels;
+		list[1] = hdsp->ds_out_channels;
+		list[2] = hdsp->ss_out_channels;
+		return snd_interval_list(c, 3, list, 0);
 	} else {
 		list[0] = hdsp->ds_out_channels;
+		list[1] = hdsp->ss_out_channels;
 	}
-	list[1] = hdsp->ss_out_channels;
 	return snd_interval_list(c, 2, list, 0);
 }
 
@@ -4229,7 +4238,7 @@
 			.integer = 1,
 		};
 		return snd_interval_refine(c, &t);	
-	} else if (r->min > 48000) {
+	} else if (r->min > 48000 && r->max <= 96000) {
 		snd_interval_t t = {
 			.min = hdsp->ds_in_channels,
 			.max = hdsp->ds_in_channels,
@@ -4260,7 +4269,7 @@
 			.integer = 1,
 		};
 		return snd_interval_refine(c, &t);	
-	} else if (r->min > 48000) {
+	} else if (r->min > 48000 && r->max <= 96000) {
 		snd_interval_t t = {
 			.min = hdsp->ds_out_channels,
 			.max = hdsp->ds_out_channels,


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

* Re: hdsp update
  2003-11-23 17:21 hdsp update Thomas Charbonnel
@ 2003-11-24 11:40 ` Takashi Iwai
  2003-11-24 14:52   ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2003-11-24 11:40 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel, torger

At Sun, 23 Nov 2003 18:21:01 +0100,
Thomas Charbonnel wrote:
> 
> [1  <text/plain; us-ascii (7bit)>]
> Hi,
> 
> The attach patch fixes problems with speed modes for H9632 cards (many
> thanks to Pentti Ala-Vannesluoma for testing the driver and helping
> finding bugs), and the AutoSync mode issue (for all cards) reported by
> Anders Torger at the end of september.

thanks, patch is applied to cvs now.

> A new version of hdspmixer is also available here :
> http://www.undata.org/~thomas/
> It is mostly a bugfix release for H9632 users.
> There is also a new version of hdspconf, but it only adds a .desktop
> file and a nice icon (to bring it to par with the new hdspmixer), so
> Takashi, feel free not to commit this one if you don't have much time :)

i'll check this, too.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: hdsp update
  2003-11-24 11:40 ` Takashi Iwai
@ 2003-11-24 14:52   ` Takashi Iwai
  2003-11-24 17:48     ` Thomas Charbonnel
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2003-11-24 14:52 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel, torger

At Mon, 24 Nov 2003 12:40:15 +0100,
I wrote:
> 
> > A new version of hdspmixer is also available here :
> > http://www.undata.org/~thomas/
> > It is mostly a bugfix release for H9632 users.
> > There is also a new version of hdspconf, but it only adds a .desktop
> > file and a nice icon (to bring it to par with the new hdspmixer), so
> > Takashi, feel free not to commit this one if you don't have much time :)
> 
> i'll check this, too.

ok, now they are on cvs.
i modified the configure to add --with-desktop-dir and
--with-pixmap-dir options, so that they can be specified separately.
also, the --with-soundbase option works properly now.

there were several compile warnings in hdspmixer, namely, non-used
static variables defined in some header files for label, etc.
i added ifdef for each of them to shut up the warnings.

still there is a warning which must be fixed.
HDSPMixerCard::getAutosyncSpeed() returns no value if external_rate =
6.  i assume it's 0 since the minus value will result in the error at
starting.  please let me know the correct value it should be.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: hdsp update
  2003-11-24 14:52   ` Takashi Iwai
@ 2003-11-24 17:48     ` Thomas Charbonnel
  2003-11-24 18:17       ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Charbonnel @ 2003-11-24 17:48 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai a wrote :
> At Mon, 24 Nov 2003 12:40:15 +0100,
> I wrote:
> 
>>>A new version of hdspmixer is also available here :
>>>http://www.undata.org/~thomas/
>>>It is mostly a bugfix release for H9632 users.
>>>There is also a new version of hdspconf, but it only adds a .desktop
>>>file and a nice icon (to bring it to par with the new hdspmixer), so
>>>Takashi, feel free not to commit this one if you don't have much time :)
>>
>>i'll check this, too.
> 
> 
> ok, now they are on cvs.
> i modified the configure to add --with-desktop-dir and
> --with-pixmap-dir options, so that they can be specified separately.
> also, the --with-soundbase option works properly now.
> 
> there were several compile warnings in hdspmixer, namely, non-used
> static variables defined in some header files for label, etc.
> i added ifdef for each of them to shut up the warnings.
> 
> still there is a warning which must be fixed.
> HDSPMixerCard::getAutosyncSpeed() returns no value if external_rate =
> 6.  i assume it's 0 since the minus value will result in the error at
> starting.  please let me know the correct value it should be.
> 
> 
> Takashi

I updated hdspmixer and hdspconf to fix all these problems :
http://www.undata.org/~thomas/
I just checked cvs to send you a clean patch instead, but the latest 
changes were not in there yet. Sorry for the extra workload this gives you.

Thanks,
Thomas



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: hdsp update
  2003-11-24 17:48     ` Thomas Charbonnel
@ 2003-11-24 18:17       ` Takashi Iwai
  2003-11-24 18:37         ` Thomas Charbonnel
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2003-11-24 18:17 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

At Mon, 24 Nov 2003 18:48:04 +0100,
Thomas Charbonnel wrote:
> 
> Takashi Iwai a wrote :
> > At Mon, 24 Nov 2003 12:40:15 +0100,
> > I wrote:
> > 
> >>>A new version of hdspmixer is also available here :
> >>>http://www.undata.org/~thomas/
> >>>It is mostly a bugfix release for H9632 users.
> >>>There is also a new version of hdspconf, but it only adds a .desktop
> >>>file and a nice icon (to bring it to par with the new hdspmixer), so
> >>>Takashi, feel free not to commit this one if you don't have much time :)
> >>
> >>i'll check this, too.
> > 
> > 
> > ok, now they are on cvs.
> > i modified the configure to add --with-desktop-dir and
> > --with-pixmap-dir options, so that they can be specified separately.
> > also, the --with-soundbase option works properly now.
> > 
> > there were several compile warnings in hdspmixer, namely, non-used
> > static variables defined in some header files for label, etc.
> > i added ifdef for each of them to shut up the warnings.
> > 
> > still there is a warning which must be fixed.
> > HDSPMixerCard::getAutosyncSpeed() returns no value if external_rate =
> > 6.  i assume it's 0 since the minus value will result in the error at
> > starting.  please let me know the correct value it should be.
> > 
> > 
> > Takashi
> 
> I updated hdspmixer and hdspconf to fix all these problems :
> http://www.undata.org/~thomas/

applied to cvs.  thanks!

> I just checked cvs to send you a clean patch instead, but the latest 
> changes were not in there yet. Sorry for the extra workload this gives you.

no problem at all.  (blame to sourceforge :)


ciao,

Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: hdsp update
  2003-11-24 18:17       ` Takashi Iwai
@ 2003-11-24 18:37         ` Thomas Charbonnel
  2003-11-25 11:56           ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Charbonnel @ 2003-11-24 18:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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

Takashi Iwai wrote :
>>
>>I updated hdspmixer and hdspconf to fix all these problems :
>>http://www.undata.org/~thomas/
> 
> 
> applied to cvs.  thanks!
> 
> 
>>I just checked cvs to send you a clean patch instead, but the latest 
>>changes were not in there yet. Sorry for the extra workload this gives you.
> 
> 
> no problem at all.  (blame to sourceforge :)
> 
> 
> ciao,
> 
> Takashi

Thanks !
While we're at we should shut up the warnings in hdsploader too. Trivial 
diff attached.

Thomas

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

--- hdsploader.c.cvs	2003-11-03 20:09:55.000000000 +0100
+++ hdsploader.c	2003-11-24 19:25:50.000000000 +0100
@@ -31,14 +31,13 @@
 
 void upload_firmware(int card)
 {
-    int err, i;
+    int err;
     snd_hwdep_t *hw;
     snd_hwdep_info_t *info;
     char card_name[6];
     hdsp_version_t version;
     
     hdsp_firmware_t firmware;
-    hdsp_config_info_t config_info;
     
     snd_hwdep_info_alloca(&info);
     snprintf(card_name, 6, "hw:%i", card);
@@ -97,7 +96,6 @@
 
     snd_ctl_card_info_t *info;
     snd_pcm_info_t *pcminfo;
-    int cards = 0;
     
     snd_ctl_card_info_alloca(&info);
     snd_pcm_info_alloca(&pcminfo);    

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

* Re: hdsp update
  2003-11-24 18:37         ` Thomas Charbonnel
@ 2003-11-25 11:56           ` Takashi Iwai
  0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2003-11-25 11:56 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

At Mon, 24 Nov 2003 19:37:37 +0100,
Thomas Charbonnel wrote:
> 
> [1  <text/plain; us-ascii (7bit)>]
> Takashi Iwai wrote :
> >>
> >>I updated hdspmixer and hdspconf to fix all these problems :
> >>http://www.undata.org/~thomas/
> > 
> > 
> > applied to cvs.  thanks!
> > 
> > 
> >>I just checked cvs to send you a clean patch instead, but the latest 
> >>changes were not in there yet. Sorry for the extra workload this gives you.
> > 
> > 
> > no problem at all.  (blame to sourceforge :)
> > 
> > 
> > ciao,
> > 
> > Takashi
> 
> Thanks !
> While we're at we should shut up the warnings in hdsploader too. Trivial 
> diff attached.

applied.  thanks!


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

end of thread, other threads:[~2003-11-25 11:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-23 17:21 hdsp update Thomas Charbonnel
2003-11-24 11:40 ` Takashi Iwai
2003-11-24 14:52   ` Takashi Iwai
2003-11-24 17:48     ` Thomas Charbonnel
2003-11-24 18:17       ` Takashi Iwai
2003-11-24 18:37         ` Thomas Charbonnel
2003-11-25 11:56           ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2003-11-06 12:37 hdsp9632 mixer fix + gcc 2.9x compile fix Thomas Charbonnel
2003-11-07 11:18 ` hdsp update Benouille
2003-11-07 12:55   ` Thomas Charbonnel

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.