Adrian Knoth [Mon, 7 Mar 2011 18:03:05 +0000 (19:03 +0100)]
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>
Adrian Knoth [Mon, 7 Mar 2011 18:03:03 +0000 (19:03 +0100)]
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>
Adrian Knoth [Tue, 1 Mar 2011 09:42:27 +0000 (10:42 +0100)]
hdspmixer: Fix labels on H9652
The H9652 uses the same layout as the Digiface, except Digiface features
an additional headphones out. That's why the channel mappings are the
same, but Digiface has mexdest=14 while H9652 has maxdest=13 (12 ADAT
pairs, another pair for S/PDIF and headphone-L/R on Digiface)
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Tue, 1 Mar 2011 09:42:26 +0000 (10:42 +0100)]
hdspmixer: Lower nesting depth in label assignment
This fix is mostly cosmetic, the long if-then-else-if-chain was rather
confusing. To improve code readability, use simple if-then statements
and leave the function as soon as a match is found.
Clear code would probably use a two-dimensional map, but it seems rather
overengineered.
Last but not least, the non-matching case was augmented by assigning a
generic "1", "2", "3" .. channel naming schema to prevent hdspmixer from
crashing.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Mon, 28 Feb 2011 13:56:07 +0000 (14:56 +0100)]
hdspmixer: Fix compiler warnings.
All compiler warnings were caused by a conversion from "foo" to a
char pointer. Given that the string itself really is constant, simply
add the keyword to make g++ happy.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 24 Feb 2011 20:33:31 +0000 (21:33 +0100)]
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>
Adrian Knoth [Thu, 24 Feb 2011 20:33:30 +0000 (21:33 +0100)]
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>
Adrian Knoth [Thu, 24 Feb 2011 20:33:29 +0000 (21:33 +0100)]
hdspmixer: Bump version number to 1.10
Florian Faber's last hdspmixer64 version was 1.9, so let's make this the
successor (contains everything that was in 1.9 and also Fredrik's work
on AES(32) support)
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 24 Feb 2011 20:33:26 +0000 (21:33 +0100)]
hdspmixer: Improve code coherency
Move channelmappings into one place (channelmap.h). Also, use "aes32"
when referring to the card itself to avoid confusion and to be coherent
with the remaining naming scheme.
This work has mainly been done by Fredrik Lingvall.
Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com> Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 3 Feb 2011 21:43:34 +0000 (22:43 +0100)]
hdspmixer: retab and reindent code.
Something seriously was wrong, probably different patches with different
tabwidth levels. I switched to spaces to avoid ambiguity and let vim
reindent everything.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 27 Jan 2011 10:41:47 +0000 (11:41 +0100)]
hdspmixer: Don't use channelmap from hdspm.h
The channel mapping has been moved to hdspm.c, so it's no longer
available to userspace tools. For now, let's simply copy (duplicate) the
data and wait for a way to query this information from the driver.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Giuliano Pochini [Sun, 15 Mar 2009 20:35:09 +0000 (21:35 +0100)]
echomixer: Fix echomixer to work with the new drivers
There is a long standing bug in the drivers for cards with a vmixer because
I overlooked a detail in the c++ generic driver by echoaudio. Those cards
do not have a line-out volume control. It is a virtual control provided by
the generic driver. The bug is harmless because the DSP just ignores the
command to change the volume.
Since that control has been removed, echomixer must be updated. With this
patch it uses the vmixer to fake the line-out volume.
This patch makes echomixer work with the new drivers.
Fix building of alsa-tools when using the --as-needed linker option.
Please note that LDFLAGS is the _wrong_ variable to pass libraries
with, automake tells you to use _LDADD for binaries and _LIBADD for
libraries, while autoconf wants them in the LIBS variable.
Signed-off-by: Diego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Takashi Iwai [Wed, 14 Nov 2007 12:04:34 +0000 (13:04 +0100)]
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.
Takashi Iwai [Wed, 14 Feb 2007 23:22:20 +0000 (00:22 +0100)]
us428control 0.4.5
- A new command line option indicates which interface model is actually
present (-m us428|us224|mixxx) -- nb. the mixxx mode is actually
orthogonal to the us428 and us224 ones, which are in turn both mutually
exclusive, so that more than one -m option can be specified in the same
command line, for compatibility sake; default to us428 mode, of course.
- New BANK switching allows for mapping to a maximum of 32 (!) logical
channel-tracks. This introduces effective BANK L/R button functionality.
Under the default us428 mode it now offers a total of 4 switchable banks
(or layers) for the available 8 fader-channels; while in the new us224
mode, one can switch across 8 banks of 4 fader-channels each. Each
fader-channel maps sequentially (0-31) to a logical track in your DAW,
when connected in a MMC closed-loop. This only applies when not in INPUT
MONITOR mode.
- SELECT, REC, MUTE and SOLO state LEDs/buttons/channel functionality
are now split into INPUT MONITOR and BANK modes, so that each bank
(layer) has its own state. INPUT MONITOR mode gets its own independent
state, which is the only that affects the audio interface channel signal
volume (via respective faders) through the internal hardware mixer --
nb. this special mode deals exclusively to channel/faders 0 and 1 (A/B)
and eventually to 2 and 3 (C/D) which are only available on the US-428
and made accessible through modprobe'ing snd-usb-usx2y with nrpacks=1
and thus made usable via the special hwdep "rawusb" interface mode (ie.
hw:N,2).
- The new track-channel mapping gets effectively signaled through
correspondent but rather experimental MMC MASKED WRITE sub-commands for
RECORD, MUTE and SOLO arming. It is important to note that this late
SOLO sub-command is just some MMC implementation mockup of mine, as I
believe there's no support whatsoever for just that from the official
MIDI MMC RP-013 document (which I don't even have access to date:)
However, I've been prototyping around with this, to my own amusement and
home-brew audio/MIDI sequencer, qtractor:
http://qtractor.sourceforge.net
- NULL fader switch LED is now switchable on/off, but not actually of
any usefulness at this time ;)
I have tried to maintain all previous functionality as it were. Of
course I only tested this new stuff over my own US-224, for which it
surely needs the '-m us224' command-line option. This is also proposedto
be specified in a correspondent udev rule, for all this to work
correctly OOTB for the US-224 at least. US-428 owners don't need to
bother ;)