hdspmixer segfault (1.0.24+)
Hi, I'm getting a segfault from hdspmixer using the current git alsa-tools (1.0.23 works, 1.0.24+ does not). See below for a backtrace. I'm running 2.6.33.x rt30, could this be the problem? (a dependency on newer kernels?)
-- Fernando
$ gdb ./hdspmixer/src/hdspmixer GNU gdb (GDB) Fedora (7.2-41.fc14) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /scratch/nando/alsa-tools/alsa-tools.git/hdspmixer/src/hdspmixer...done. (gdb) run Starting program: /scratch/nando/alsa-tools/alsa-tools.git/hdspmixer/src/hdspmixer [Thread debugging using libthread_db enabled]
HDSPMixer 1.6 - Copyright (C) 2003 Thomas Charbonnel <[email protected]> This program comes with ABSOLUTELY NO WARRANTY
HDSPMixer is free software, see the file COPYING for details
Looking for RME cards:
Card 0: RME Hammerfall DSP + Multiface at 0xe9200000, irq 19 Multiface found!
Card 1: HDA Intel at 0xe9300000 irq 32
1 RME cards card found.
Initializing default presets
Program received signal SIGSEGV, Segmentation fault. HDSPMixerPresets::restore_preset (this=0x81fe500, prst=1) at HDSPMixerPresets.cxx:176
176 basew->inputs->strips[i]->pan->pos[z] =
basew->inputs->strips[i]->data[card][speed][p]->pan_pos[z]; Missing separate debuginfos, use: debuginfo-install alsa-lib-1.0.24-1.fc14.i686 expat-2.0.1-10.fc13.i686 fltk-1.1.10-2.fc14.i686 fontconfig-2.8.0-2.fc14.i686 freetype-2.4.2-4.fc14.i686 glibc-2.13-1.i686 libX11-1.3.4-3.fc14.i686 libXau-1.0.6-1.fc14.i686 libXext-1.1.2-2.fc14.i686 libXft-2.1.14-1.fc13.i686 libXinerama-1.1-2.fc13.i686 libXrender-0.9.6-1.fc14.i686 libgcc-4.5.1-4.fc14.i686 libstdc++-4.5.1-4.fc14.i686 libxcb-1.7-1.fc14.i686
(gdb) bt
#0 HDSPMixerPresets::restore_preset (this=0x81fe500, prst=1) at HDSPMixerPresets.cxx:176
#1 0x080552de in HDSPMixerPresets::preset_change (this=0x81fe500, p=1) at HDSPMixerPresets.cxx:258
#2 0x0804b436 in readregisters_cb (arg=0x80a0710) at HDSPMixerWindow.cxx:67 #3 0x4dd311d3 in Fl::wait(double) () from /usr/lib/libfltk.so.1.1 #4 0x4dd313e4 in Fl::run() () from /usr/lib/libfltk.so.1.1 #5 0x0804af34 in main (argc=1, argv=0xbffff284) at hdspmixer.cxx:114
(gdb)
Quoted 4 lines · Fernando Lopez-Lezcano
Hi, I'm getting a segfault from hdspmixer using the current git alsa-tools (1.0.23 works, 1.0.24+ does not). See below for a backtrace. I'm running 2.6.33.x rt30, could this be the problem? (a dependency on newer kernels?)
I have fixed this bug a couple of days ago:
http://thread.gmane.org/gmane.linux.alsa.devel/82452
They still need to be applied to the alsa-tools.git, but if you like, you can grab the patches and verify they work for you.
Cheers
Signature · 1 line
mail: [email protected] http://adi.thur.de PGP/GPG: key via keyserver
Quoted 7 lines · Adrian Knoth
Quoted 4 lines · Fernando Lopez-Lezcano
Hi, I'm getting a segfault from hdspmixer using the current git alsa-tools (1.0.23 works, 1.0.24+ does not). See below for a backtrace. I'm running 2.6.33.x rt30, could this be the problem? (a dependency on newer kernels?)
Quoted 6 lines
I have fixed this bug a couple of days ago:
http://thread.gmane.org/gmane.linux.alsa.devel/82452They still need to be applied to the alsa-tools.git, but if you like, you can grab the patches and verify they work for you.
They do work in a first (remote) test. Thanks very much!! -- Fernando
Quoted 8 lines · Fernando Lopez-Lezcano
Quoted 7 lines · Adrian Knoth
Quoted 4 lines · Fernando Lopez-Lezcano
Hi, I'm getting a segfault from hdspmixer using the current git alsa-tools (1.0.23 works, 1.0.24+ does not). See below for a backtrace. I'm running 2.6.33.x rt30, could this be the problem? (a dependency on newer kernels?)
Quoted 8 lines
Quoted 6 lines
I have fixed this bug a couple of days ago:
http://thread.gmane.org/gmane.linux.alsa.devel/82452They still need to be applied to the alsa-tools.git, but if you like, you can grab the patches and verify they work for you.
They do work in a first (remote) test. Thanks very much!!
But one of my users (in Planet CCRMA) still has problems with his 9652, apparently the output labels for that card are missing and that is confirmed by looking at the source (his card works fine with the 1.0.23 hdspmixer). I applied all your patches to current git except for the version number so ignore the 1.6 version printed. I'm waiting for a backtrace from his computer about the subsequent crash. See below for his message (and thanks for all the help!).
-- Fernando
-------- Original Message --------
Subject: [PlanetCCRMA] updated hdspmixer
Date: Sun, 27 Feb 2011 15:52:51 -0500
From: Craig Bourne <[email protected]>
To: [email protected]
I updated to alsa-tools 1.0.24.1-1.3.fc14.ccrma per today's note. This does not yet fix hdspmixer as the following command-line invocation and response shows.
Signature · 107 lines
Craig Bourne *# hdspmixer* HDSPMixer 1.6 - Copyright (C) 2003 Thomas Charbonnel <[email protected] <mailto:[email protected]>> This program comes with ABSOLUTELY NO WARRANTY HDSPMixer is free software, see the file COPYING for details Looking for RME cards: Card 0: RME Hammerfall HDSP 9652 at 0xfdee0000, irq 17 HDSP 9652 found! 1 RME cards card found. Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Initializing default presets Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Unknown card type for output labels Segmentation fault (core dumped)
Quoted 4 lines · Fernando Lopez-Lezcano
But one of my users (in Planet CCRMA) still has problems with his 9652, apparently the output labels for that card are missing and that is confirmed by looking at the source (his card works fine with the 1.0.23 hdspmixer). I applied all your patches to current git except for the
Indeed. There have never been labels, and now it's crashing, most likely because of dereferencing the non-existing label array.
Do you mind to try this patch? Maybe it's enough. If Craig feels happy to do some remote try&error, I can sort this out with him.
Right now, I'm simply assigning a stupid "1", "2" .. "64" channel naming, but maybe Craig can provide us with the correct output labels? I don't have access to a H9652, so I don't have the slightest clue how the ports are named. ;)
HTH
(quoted diff) +0 -0
b/hdspmixer/src/HDSPMixerOutput.cxx
index 05a126c..0d8ea5c 100644
hdspmixer/src/HDSPMixerOutput.cxx +1 -0
@@ -262,6 +262,7 @@ void HDSPMixerOutput::setLabels() } } else { fprintf(stderr, "Unknown card type for output labels\n"); + labels_input = labels_playback = labels_madi_ss; } }
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Craig Bourne
I expect that I may have time Wednesday of this week to help with the testing, etc.
(I released a new package of alsa-tools in the planetccrma-testing repository so you can test - you have to install planetccrma-repo-testing and then yum --enablerepo planetccrma-testing install alsa-tools to get it).
-- Fernando
Quoted 29 lines
Though low level technical details are mostly absent from the documentation that RME provided, I will try to locate and forward a copy of their technical manual just in the event that that might be of some help. [Ah! Here it is!
<http://media.zzounds.com/media/hdsp9652_e-2c1bba79532db8cd1c9b6f0beb31e855.pdf>]Meanwhile, please have a look at /RME9652.conf/ which reads, in part (starting from about line 38):
...
slave.pcm { type route slave { pcm { type hw card $CARD } channels 26 } ttable.0.24 1 ttable.1.25 1}
...This number also reflects RME's characterization of the card (from the title page of their manual)
Quoted 9 lines
PCI Busmaster Digital I/O System
2 + 24 Channels SPDIF / ADAT Interface
24 Bit / 96 kHz Digital Audio
ADAT Sync In
MIDI I/O
TotalMix™
24 Bit / 96 kHz ü
SyncAlign® ZLM® SyncCheck®
...
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 2 lines · Craig Bourne
PCI Busmaster Digital I/O System
2 + 24 Channels SPDIF / ADAT Interface
I've digged into the driver source. Your H9652 is more or less a Digiface. The channel *count* was never a question, this is defined by the driver anyway. The remaining question simply was how to label the output destinations.
Quoted 1 line
From the manual, the answer is pretty obvious: ADAT-1.1 to ADAT-1.8,
followed by ADAT-2.1 to ADAT-2.8 and ADAT 3.1-to 3.8, last is S/PDIF.
In double-speed mode (everything above 48kHz), the ADAT channels are cut in half, so ADAT 1.1 to ADAT 1.4, ADAT 2.1 to 2.4 and so on. S/PDIF remains unchanged as it supports higher sample rates at static channel counts (like AES/EBU).
Quoted 4 lines
At various times in the past when one was required to specify (e.g., Input/Output) channels to an ALSA tool (or a program that relied on the ALSA sound architecture) a mismatch in this number (presumably of pcm channels) had less than desirable consequences.
We're not talking driver here, the critical parts remain unchanged in the kernel.
Quoted 5 lines
All of this leads me to the conjecture that fudging an arbitrary number that stands in for "channels" is perhaps not the best course (not to forget that, at the end of our testing, I would hope that this sound card that costs as much as the computer that houses it will not have suffered any damage).
Of course, this is open source. It comes without any warranty and you're free to avoid it, but to the best of my knowledge, you must not be afraid.
Firstly, it's userspace, so nothing can really kill your card. Second, the whole logic is an FPGA, so it can always be flashed to a working state if something goes wrong (it cannot go wrong, as you cannot accidentally flash your card). Last but not least: the channel count has always been correct, 26 all the time, only the name array was missing.
So we have this "read 26 channel names from the naming array", and it's now a question which names to write in there. I've given the answer above, but want to stress again that we're talking pure C pure userland here, so it's close to a hello world program:
printf("Channel name is %s\n", name_array[channel_number]);with name_array being something like { "ADAT-1.1", "ADAT-1.2", .. } and so on. Right now, with the package prepared by Fernando, you'll simply see "1", "2", .. "26" instead of "ADAT-1.1", but this will change in a minute.
HTH
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Mon, Feb 28, 2011 at 04:35:36PM -0500, Craig Bourne wrote:
Hi!
Quoted 2 lines
S/PDIF], this is all very reassuring. I will carry on with the testing on Wednesday and report back my results.
For all who care, foremost probably Fernando:
$ git clone http://cluster.inf-ra.uni-jena.de/~adi/alsa-tools.git $ git checkout adi-fixes
(or simply pull this branch into your local alsa-tools git repo).
I've reworked the code in question. At least the label thing should be fine now, but let's wait for Craig to confirm it.
Unfortunately, I won't be around on Wednesday. Maybe Fernando will prepare another test package, if not, compiling from source isn't that hard:
After these two git commands, go into hdspmixer an run ./gitcompile. Then, if everythings builds correctly, run ./src/hdspmixer so see if it's working.
Note that the git repo above might disappear once we have fixed all remaining issues, so if you read this mail in a couple of months from now, don't expect the URL to be still functional. ;)
Cheers
Signature · 1 line
mail: [email protected] http://adi.thur.de PGP/GPG: key via keyserver