[LAU] RME HDSP 9632 - amixer control

Giso Grimm gg3137 at vegri.net
Fri Oct 23 08:30:50 EDT 2009


Hi again,

a few more comments:

1. changes via amixer do not show up in hdspmixer. You have to rely on
your ears.

2. as I guessed before the output attenuation is only on the software
side. I looked at the hdspmixer-code, and there it is:

//--HDSPMixerWindow.cxx----------------------------------------------------------
	attenuation_l =
(double)(outputs->strips[dst*2]->fader->posToInt(outputs->strips[dst*2]->fader->pos[0]))/65535.0;
	attenuation_r =
(double)(outputs->strips[dst*2+1]->fader->posToInt(outputs->strips[dst*2+1]->fader->pos[0]))/65535.0;

	left_val = attenuation_l* vol * (1.0 - pan);
	right_val = attenuation_r* vol * pan;

muted: 	
	snd_ctl_elem_value_set_integer(ctl, 0,
src*cards[current_card]->playbacks_offset+cards[current_card]->channel_map[idx-1]);
	snd_ctl_elem_value_set_integer(ctl, 1, cards[current_card]->dest_map[dst]);
	snd_ctl_elem_value_set_integer(ctl, 2, (int)left_val);
	if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
//--HDSPMixerWindow.cxx----------------------------------------------------------

3. hdspmixer and amixer use the same underlying API, thus if your card
works with hdspmixer it definitely also will with amixer. It is just a
matter of finding the correct settings. I would suggest simply to try
out all possibilities (for a single software output, let's say channel
0), this is a maximum of 26 trials; with a steady software output signal
you can do that in less than a minute.

4. The factory default of ALSA drivers is to mute everything, and the
factory default for hdspmixer is a direct routing of software channels
to hardware channels (maybe with exceptions).

-- Giso

Klaus Schulz wrote:
> If you read the thread at alsa-devel - you refered to below - it seems
> that more people were facing this issue already in 2003.
> 
> It seems that the whole thing works only, if you use the default
> setting/routing.
> 
> Currently at factory default  HDSPmixer routes the first playback
> channel to the first Adat output, which happens to sit right below
> playback out1/out2 in the HDSPmixer graphics.
> 
> 
> Correspondingly this  would mean I need to use an Alsaplayback channel
> out 13/14  to get to AN3+4. I think it is worth a try.
> But - how do I output data to alsa-playback channel 13/14 on my device 0
> ? I am using ecasound and alsaoutput 0,0 right now for out1/out2. No
> idea how to assign 13/14.
> 
> Since the earlier discussed amixer method won't work -- at least in my
> case - I am wondering if the commands
> 
> /usr/bin/amixer -c 0 cset numid=5 26,2,32768 
> /usr/bin/amixer -c 0 cset numid=5 27,3,32768 
> 
> reflect the HDSP logic:
> 
> The logic in HDSPmixer to setup the route from Alsa Out1/Out2 to my
> AN3+4 output:
> 
> 1. Assign playback channels Out1/Out2 to AN3+4 output channels. This
> will automatically mute playback channels out1/out2 . Now you need to
> unmute the playback channels.
> Only this action will activate the new outputs. ( This you'll see if you
> look in the HW-output selection field)
> 
> The output channels AN3+AN4 themselves run at 100% or 0db at factory
> default. No need to touch them. However would be nice to know how to
> control these with amixer.
> 
> (Note: What's strange though playback output 15/16 is muted by default!?!)
> 
> Were not yet ready:
> 
> To get rid of a connection e.g. the default Adat routing, since now
> traffic is routed to AN3+4 AND Adat A1+2 you:
> 
> 2. Select the Adat channels A1/A2 on playback channel Out1/Out2. Now you
> mute and then unmute manually playback channels Out1/Out2. Without this
> manual action nothing will change.
>    No idea how to do that with amixer.
> 
> The mute/unmute of playback outputs seem to play fundamental role in the
> routing process. Perhaps something in this area goes wrong. Again: Is
> there a way to explicitely control  channel
> volume with amixer?
> 
> ( Beside that I figured that  "mute" on MASTER and Playback Outs, does
> not work at all with HDSPmixer)
> 
> Cheers
> \Klaus
> 
> 
> 
> 
> 
> 
> 
> On Fri, Oct 23, 2009 at 9:16 AM, Giso Grimm <gg3137 at vegri.net
> <mailto:gg3137 at vegri.net>> wrote:
> 
>     Hi Klaus,
> 
>     I hope you don't mind that I copy the reply to LAU (there are a lot RME
>     hdsp-users who probably know more about it that I do).
> 
> 
>     Klaus Schulz wrote:
>     > 1. Could you please share your .asoundrc. I guess it is the .asoundrc
>     > where you set "DSP".
> 
>     It is not defined in the .asoundrc, but on ALSA itself: Try "cat
>     /proc/asound/cards" and find out the ALSA-name of your card, e.g. here
>     on my office PC it is:
> 
>      0 [PAD            ]: Digi96 - RME Digi96/8 PAD
>                          RME Digi96/8 PAD at 0xfd000000, irq 21
>      1 [DSP            ]: H-DSP - Hammerfall DSP
>                          RME Hammerfall HDSP 9632 at 0xfeae0000, irq 21
>      2 [ICH5           ]: ICH4 - Intel ICH5
>                          Intel ICH5 with AD1985 at irq 17
> 
>     (the hdsp9652 is at home).
> 
>     > 2. 32768=0db  refers to the playback controls, They  run at 0db at 32768
>     > and +6db at 64k
>     >     However  this seems to be somewhat different on the ouptuts.
>     0db=max
>     > position. I'd guess this should be 64k by default.
>     >     Question: What do I actually control with below commands? I guess
>     > the playback-inputs  only. How do I control the output channels?
>     > Probably I need to set it to 0db to.
> 
>     The mixer in the hdsp cards can control routing from hardware inputs to
>     hardware outputs (for 'zero' latency monitoring) and the software output
>     to hardware outputs.
> 
>     Hardware inputs are channels 0-25, software outputs 26-51, hardware
>     outputs 0-25. I don't think you can control the playback attenuation
>     with amixer. It might be (but that is a guess) that hdspmixer attenuates
>     the output channels only in software (by adding the output attenuation
>     to all relevant input/playback channels); When controlling only via
>     amixer I do not have to configure the output attenuation.
> 
>     The channel mapping is also discussed here:
> 
>     http://www.mail-archive.com/alsa-devel@lists.sourceforge.net/msg06019.html
> 
>     > 3. I tried without success:
>     >
>     > /usr/bin/amixer -c 0 cset numid=5 26,2,32768  #first
>     playbackchannel to
>     > first output of analog extension board (ch2)
>     > /usr/bin/amixer -c 0 cset numid=5 27,3,32768  #first
>     playbackchannel to
>     > first output of analog extension board (ch3)
> 
>     The channel numbering starts with zero. I do not know if the extension
>     board uses the same channels as ADAT out, maybe try also channels 8-15.
> 
> 
>     Cheers!
> 
>     Giso
> 
> 




More information about the Linux-audio-user mailing list