Commit graph

18 commits

Author SHA1 Message Date
Adrian Knoth
287bc091e9 hdspmixer: Save and restore level meter settings
Each preset can have a different level meter setting (FS samples for
OVR, release rate, minimum level and so on).

These settings were not saved/restore to/from the on-disk file. This
patch adds the missing functionality.

Unfortunately, the current on-disk format is a 1:1 binary dump from
memory without any header information. In other words, this commit will
break backward compatibility with older hdspmixers, that is, new preset
files cannot be read by older versions of hdspmixer. However, we can
still read the old mix files and save them in the new format.

I hence bumped the version, so users know to re-create their files after
upgrading to 1.11.

Bug discovered by Raphaël Doursenaud from ematech.fr.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 13:01:45 +01:00
Adrian Knoth
7416c3a83c hdspmixer: Show cardname in window title
When running with more than one card, it isn't obvious which card is
shown.

Store the ALSA cardname in the corresponding class and show it in the
window title upon switching cards.

Also, don't show "(null)" but "(unsaved)" in case the user hasn't
selected a preset file.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:04:56 +01:00
Adrian Knoth
455a06756f hdspmixer: Introduce output channel count for all cards.
Some cards (like multiface) have more physical output ports than
playback ports, mostly because of additional headphones out.

For those cards, the old abstraction model of channels_input and
channels_output doesn't fit, so let's introduce channels_output.

Of course, channels_output is always 2*max_dest at the given speed_mode
(SS/DS/QS), so one could extend this idea, store all destination
settings in channels_output[3] (one for each speed mode) and rip off the
massive code duplication for setting maxdest or max_dest respectively.

Note that dest_map_whatever_speed_mode's array size indirectly defines
the right value for channels_output (read: even more unwanted
redundancy)

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:04:12 +01:00
Adrian Knoth
2b10cb8be8 hdspmixer: Fix preset activation segfault on AES(32)
When selecting preset 6 or 7 on AES(32), hdspmixer has caused a segfault
due to indirect out of bound access on the destination label array.

The amount of destinations is the number of physical stereo
pairs, so it's usually half the channel count, in some cases one more if
there are additional headphone jacks.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:03:43 +01:00
Adrian Knoth
92e0a21b89 hdspmixer: Replace hardcoded 3 by MAX_CARDS
We have a define for the number of cards. Use it.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:03:26 +01:00
Adrian Knoth
646eacb626 hdspmixer: Fix metering for non-MADI cards
Currently, hdsp and hdspm use different ioctls. Consequently, the metering
is wrong. To avoid code duplication, use pointers to the corresponding
struct members.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 11:11:19 +01:00
Adrian Knoth
97e96addff hdspmixer: Fix ALSA snd_ctl_open error when running with three cards.
If three (or more) RME cards are installed in one box, hdspmixer will
try to open a non-existing 4th card, causing an error in snd_ctl_open
and finally terminates itself.

cards[] is a static array, and one must not read beyond the last
element. The solution is far from elegant, however, it's a rather
unintrusive change.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 11:11:13 +01:00
Adrian Knoth
3f34b2c0f2 hdspmixer: Increase height of about window.
The copyright list got longer, so we need more vertical space.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 11:10:58 +01:00
Adrian Knoth
69991756aa hdspmixer: Add RME HDSPe AES and AES32 support.
Code provided by  Fredrik Lingvall <fredrik.lingvall@gmail.com>

It seems the PCIe (AES) and PCI (AES32) versions behave the same, so we
can kill two birds with one stone.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:58:21 +01:00
Adrian Knoth
e24e56795e Add support for RME MADI, RayDAT and AIO
Merged the work by Florian Faber that's distributed separately as
hdspmixer64.

Code taken from http://wiki.linuxproaudio.org/index.php/App:hdspmixer_64

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 19:59:43 +01:00
Takashi Iwai
d6d0775e8c hdspmixer - Automatic initialization of secondary cards
From debian bug#450805:

We are using Hammerfall DSP cards. After booting, their audio output
remains silent until hdspmixer is started. No interaction in the GUI
of hdspmixer is necessary to unmute the first HDSP card; however,
further cards are only unmuted when activating the respective GUI
page ("2", "3"). Apparently, hdspmixer does some automatic
initialization of the card when activating the page.

Since we'd like to have a fully automatic startup, the following
patch activates the page for each existing card on startup, thereby
initializing them. There are surely more elegant solutions, but this
patch is tested and solves the problem for us.
2007-11-14 13:04:34 +01:00
Clemens Ladisch
7fcbc9917e sound - fix .iface field of mixer control elements
This patch changes .iface to SNDRV_CTL_ELEM_IFACE_MIXER whre _PCM or
_HWDEP was used in controls that are not associated with a specific PCM
(sub)stream or hwdep device, and changes some controls that got
inconsitent .iface values due to copy+paste errors.  Furthermore, it
makes sure that all control that do use _PCM or _HWDEP use the correct
number in the .device field.
2005-07-29 14:33:00 +00:00
Takashi Iwai
792c421e0a alsa-tools small handle leak
From: Mario Lang <mlang@delysid.org>

WHile reading hdspmixer sources, I found a potential handler leak.
2005-06-14 09:26:12 +00:00
Takashi Iwai
8cf8f953a2 Thomas Charbonnel <thomas@undata.org>:
- fix some problems with default presets file handling.
2003-11-27 10:42:40 +00:00
Takashi Iwai
e535082270 - updated to version 1.6
- fixed compile warnings
  - corrects preset 7 for H9632 cards
2003-11-24 18:17:05 +00:00
Takashi Iwai
ca7ae60abd - fixed H9632 problem.
- added desktop file and icon
  new options --with-desktop-dir and --with-pixmap-dir.
- fixed CXXFLAGS for soundbase option.
- fixed compile warnings.
2003-11-24 14:48:21 +00:00
Takashi Iwai
cd8875932e Thomas Charbonnel <thomas@undata.org>:
updated to version 1.4.
2003-11-03 19:10:38 +00:00
Takashi Iwai
0fb00d0bdc added hdspmixer by Thomas Charbonnel 2003-07-28 11:32:32 +00:00