Skip to contentSkip to conversation

ALSA Hammerfall DSP driver

DISCUSSION Paul Davis 4 participants 10 messages May 14, 2002 – Jun 24, 2002 1 message not in the archive

lore
Share & tools
lore

Paul Davis

author
#0 lore raw

I'm pleased to announce that ALSA now has support for the Hammerfall DSP audio interface. Details of the Hammerfall DSP are available at RME's website (www.rme-audio.com). The driver supports:

* all sample rates
* both MIDI ports
* "simple mixer" controls to allow alsamixer to control each playback stream's volume. Remember: as usual with ALSA, the initial state is "all output muted".
* peak meters for input, output and playback, with serial clipping counters.
* a non-standard control element for the matrix mixer (this may change; do not plan long term application support around it)

Things that are not tested but should work:

* big-endian systems
* multiface i/o box
* cardbus interface
* different sample clock sync sources

Things that don't work:

* RMS meters
* Flashing the firmware into the I/O box

The driver is similar in some ways the Hammerfall driver. Most notably, it requires large chunks of physically contiguous memory. This is best provided for by loading the snd-hammerfall-mem module early during booting, which provides memory for both Hammerfall and Hammerfall DSP drivers. The module has a snd-enable option which takes a comma-separated list of 0's or 1's indicating whether or not to allocate memory for the n'th Hammerfall or Hammerfall DSP device. If you have only once such device, then snd-enable=1 will be sufficient. The module checks for installed devices, so you can always insert the module and the right thing will happen even if you have removed your Hammerfall/Hammerfall DSP cards.

I am sure there will be minor glitches along the way. I would really appreciate feedback from anyone with an H-DSP (marcus - that means you! :)

A huge thank you to RME for the foresight and sense to make available sufficient information to make this driver possible.

--p

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [email protected]

#1 lore raw
Quoted 3 lines · Paul Davis

I am sure there will be minor glitches along the way. I would really appreciate feedback from anyone with an H-DSP (marcus - that means you! :)

Everything looks good, I just can't get it to play anything for me. Probably due to my limited ALSA knowledge.

I have Ardour up and running with the hdsp driver and it lets me choose between 18 output channels. I choose 'out1' and 'out2' and start playback. I have set the volume on 'Chn',1 and 'Chn',2 with amixer; 'amixer Chn,1 65535' 'amixer Chn,2 65535'. No sound. What am I missing?

Input is working just fine.

Marcus

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

author
#2 lore raw
Quoted 5 lines
Quoted 3 lines · Paul Davis

I am sure there will be minor glitches along the way. I would really appreciate feedback from anyone with an H-DSP (marcus - that means you! :)

Quoted 7 lines

Everything looks good, I just can't get it to play anything for me. Probably due to my limited ALSA knowledge.

I have Ardour up and running with the hdsp driver and it lets me choose between 18 output channels. I choose 'out1' and 'out2' and start playback. I have set the volume on 'Chn',1 and 'Chn',2 with amixer; 'amixer Chn,1 65535' 'amixer Chn,2 65535'. No sound. What am I missing?

that doesn't look like a real amixer control ID to me. did you try:

     amixer name=Chn,index=1 32768

i have been using alsamixer to control the playback volumes, and it seems to work fine. amixer reports the values correctly as well, so try

amixer cget numid=11 # channel 1 playback volume amixer cget numid=17 # channel 2 playback volume

or the more mnemonic:

amixer cget name=Chn,index=1
amixer cget name=Chn,index=2

let me know.

Note, 65536 =approx +2dB. 0dB is at 32768 ...

--p

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

#3 lore raw
Quoted 5 lines · Paul Davis

i have been using alsamixer to control the playback volumes, and it seems to work fine. amixer reports the values correctly as well, so try

amixer cget numid=11 # channel 1 playback volume

numid=11,iface=MIXER,name='Chn',index=1
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=49818

Quoted 1 line

amixer cget numid=17 # channel 2 playback volume

numid=17,iface=MIXER,name='Chn',index=2
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=49818

Still no sound.

Could it be that my kernel is too old? 2.4.7.

Could it be that I am using alsa-utils-0.9.0rc1? The one in CVS fails with:

aclocal: configure.in: 11: macro `AM_PATH_ALSA' not found in library CFLAGS=-O2 -Wall -pipe -g
./configure
loading cache ./config.cache
./configure: line 526: syntax error near unexpected token `AM_INIT_AUTOMAKE(alsa-utils,'
./configure: line 526: `AM_INIT_AUTOMAKE(alsa-utils, 0.9.0rc1)'

Is it possible to route sound to the line out port?

Which channel and card do the OSS layer use? How can I control this?

Marcus

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

author
#4 lore raw
Quoted 11 lines
Quoted 5 lines · Paul Davis

i have been using alsamixer to control the playback volumes, and it seems to work fine. amixer reports the values correctly as well, so try

amixer cget numid=11 # channel 1 playback volume

numid=11,iface=MIXER,name='Chn',index=1
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=49818

Quoted 5 lines
Quoted 1 line

amixer cget numid=17 # channel 2 playback volume

numid=17,iface=MIXER,name='Chn',index=2
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=49818

these values indicate that the playback volumes are set so that you should be able to hear stuff. unfortunately, there is no way to read the actual h/w values - these rely on a driver-side cache. but with this setting, i hear stuff played by aplay and/or ardour.

i know its mundane, but are you sure you have the cables hooked up correctly? you can set the passthru control

amixer cset name=Passthru 1

and check that passthru is working OK.

Quoted 4 lines

Could it be that my kernel is too old? 2.4.7.

Could it be that I am using alsa-utils-0.9.0rc1? The one in CVS fails with:

no, neither of these are likely causes.

Quoted 1 line

Is it possible to route sound to the line out port?

there are two levels of control. the "line out" control, which is a boolean, and not represented by the ALSA controls (but the driver turns it on). then there is the matrix mixer; the line outs are channels ... hmmm ... on a multiface, i'm not sure if they will be channels 25+26 or 19+20.

these aren't represented in the regular PCM interface, because they are not playback streams per se. Instead, you control what is sent to them via the matrix mixer. this works, but there aren't any ALSA tools that can use the matrix mixer control yet. see the discussion about this over the last few weeks. jaroslav and abramo seem to think its ok to have thousands of controls; takashi and myself prefer a different model. its not resolved yet.

Quoted 1 line

Which channel and card do the OSS layer use? How can I control this?

/dev/dsp0 -> plughw:0,0,0  # card 0, device 0, subdevice 0
/dev/dsp1 -> plughw:1,0,0  # card 1, device 0, subdevice 0
/dev/dsp2 -> plughw:2,0,0  # card 2, device 0, subdevice 0

there are ways to modify this, but this is the basic setup for OSS emulation under ALSA. the channels used will start at the first one. i haven't tried OSS emulation on either of my RME cards, but its reported to work.

--p

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

#5 lore raw

hi
i'm new to this list. i'm writing because i have a hammerfall dsp multiface soundcard with a pcmcia interface and would like to run it under linux. is it already possible to test the new drivers? i think i will need some help to get it to run for i have not so much experience in solving difficult (for me) problems. maybe you can tell me whether it's better to wait for a more stable release, or give it a try and tell me where i can access the drivers.
btw. what does CVS stand for?
thnx. marius.

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

author
#6 lore raw
Quoted 7 lines

i'm new to this list. i'm writing because i have a hammerfall dsp multiface soundcard with a pcmcia interface and would like to run it under linux. is it already possible to test the new drivers? i think i will need some help to get it to run for i have not so much experience in solving difficult (for me) problems. maybe you can tell me whether it's better to wait for a more stable release, or give it a try and tell me where i can access the drivers.

You are welcome to try it out. it has a few issues still remaining, and there are no tools to properly control the matrix mixer at this time, but it works for myself and several other people.

Oh, I just noticed that you have the cardbus version. I would appreciate if you would try it. There appear to be possible kernel problems unrelated to ALSA or the H-DSP driver. I am still trying to understand what is going on.

Quoted 1 line

btw. what does CVS stand for?

Concurrent Versions System. It allows multiple developers to be working on the same source code files at the same term, then "merge" their changes (perhaps overlapping changes) together. Many open source and software libre projects use it to allow collaboration over the internet in an effective and managed way.

--p

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

#7 lore raw
In reply to Paul Davis
Quoted 3 lines · Paul Davis

i know its mundane, but are you sure you have the cables hooked up correctly?

I booted windows to check the setup, and it works.

you can set the passthru control

Quoted 4 lines

amixer cset name=Passthru 1

and check that passthru is working OK.

This doesn't work either.

# alsactl store 1
alsactl: get_control:359: Unknown control type: 6

Is this good or bad?

At some point the 'MIDI STATE out' is lit and stays lit. I don't use MIDI. (I think, if not aplay tries to play a wav as midi.)

Marcus

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

author
#8 lore raw
Quoted 5 lines
Quoted 2 lines

i know its mundane, but are you sure you have the cables hooked up correctly?

I booted windows to check the setup, and it works.

Quoted 7 lines

you can set the passthru control

Quoted 4 lines

amixer cset name=Passthru 1

and check that passthru is working OK.

This doesn't work either.

OK, thats useful information. I wish I knew what it meant :) My best guess right now is that its something to do with the channel mapping; since the i/o configuration on the multiface is different, it may be that i need to change something about how we address certain channels.

Quoted 2 lines
# alsactl store 1
alsactl: get_control:359: Unknown control type: 6

have you updated your alsa-utils and alsa-lib? there was a new control type (64 bit integer) introduced for the H-DSP.

Quoted 2 lines

At some point the 'MIDI STATE out' is lit and stays lit. I don't use MIDI. (I think, if not aplay tries to play a wav as midi.)

Do you have any idea at what point this happens?

--p

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw

Apparently, check out this link:

http://www.mail-archive.com/[email protected]/msg03324.html

By virtue of the way cardbus works, as soon as all of the kernel hooks are in place it is treated as a pci card, therefore ALSA supports both the pci and cardbus versions of the hammerfall dsp system equally well. It seems that the problems people were having regarding the cardbus interface were due to the kernel's cardbus support and/or configuration. It isn't clear whether simply finding the right version of cardservices will make everything work or if some laptop cardbus chipsets aren't supported as well as they could be supported. For more information, do a search of the archive and read the previous posts on the subject.

784 - Michael C. Piantedosi - [email protected]

-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/