Commit graph

61 commits

Author SHA1 Message Date
Adrian Knoth
8f446f99e5 hdspmixer: Update NEWS file.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 13:03:04 +01:00
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
6cc4d395f4 hdspmixer: Use constant instead of hardcoded number of cards.
Again, use MAX_CARDS instead of "3", just in case MAX_CARDS should
change some day.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 13:01:32 +01:00
Adrian Knoth
015579556d hdspmixer: Improve pixmaps
- Added tick marks at 4dB intervals
- Small fixes and cleanup to buttons
- Better ALSA branding

All pixmaps provided by Reuben Martin.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 13:01:19 +01:00
Adrian Knoth
5e77f279ba hdspmixer: Fix toggle of master mute and solo buttons
The sensitive area for master mute and solo buttons was slightly off.
Discovered and fixed by Reuben Martin. Thanks for the patch.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 13:01:05 +01:00
Adrian Knoth
3771b825c8 hdspmixer: New pixmaps
Reuben Martin has provided me with an updated pixmap set to replace
RME's 1998 style no longer in use by the corresponding Win32 tools.

The Linux pixmaps are based on ardour2. Likewise hdspmixer, ardour2 is
GPLv2.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-03-14 10:32:49 +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
1669acbe34 hdspmixer: [cosmetics] Break code into logic blocks
Convert the if-then-else-if chain into standalone if-then blocks to
improve readability. A switch-case statement would also do the trick,
but it's less readable.

No (intended) semantic change.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:04:36 +01:00
Adrian Knoth
27f5bbfd9e hdspmixer: Fix code indentation
Only cosmetics, no changed semantics. Indent the whole function to get
rid of a mixture of tabs and spaces.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:04:29 +01:00
Adrian Knoth
24832bf340 hdspmixer: Provide headphones out on Multiface/Digiface
Both, Multiface and Digiface feature a separate headphone submix, so
reflect this additional pair of channels in the corresponding maps.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:04:19 +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
53e4a1a44e hdspmixer: Adjust playback channel count on Multiface.
The multiface has 18/14 (SS/DS) playback channels, matching the native
18/14 I/O ports. Headphones don't count (only for #destinations).

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:04:02 +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
863c47cebe 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>
2011-03-01 13:48:13 +01:00
Adrian Knoth
05d6bc9728 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>
2011-03-01 13:47:21 +01:00
Adrian Knoth
042363a429 hdspmixer: Make static destination maps extern
To prevent multiple inclusion, make the destmaps global and only
reference them via extern.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-01 13:46:50 +01:00
Adrian Knoth
e728f0d073 hdspmixer: Don't use hardcoded number of cards.
We have introduced MAX_CARDS before to make the code more safe and
extendable, so it's just sane to use it all over the place.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:55:23 +01:00
Adrian Knoth
c3349a84ea 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>
2011-02-28 15:55:14 +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
3506d3d9a7 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>
2011-02-28 11:11:05 +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
073fad25cb hdspmixer: Update FSF address.
The FSF has moved, so reflect this change in the about dialogue.

See also http://www.fsf.org/about/contact/

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 11:10:52 +01:00
Adrian Knoth
9ea2fb1f88 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>
2011-02-28 11:10:43 +01:00
Adrian Knoth
0201fd1778 hdspmixer: Style and purity fixes for name arrays.
Contribution 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>
2011-02-10 18:58:37 +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
cef20c040c hdspmixer: Break overlong line and don't plenken.
Pure code beautification, just in case somebody ever needs to touch this
again.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07 14:55:23 +01:00
Adrian Knoth
5d4bcc44ce hdspmixer: Beautification; Lower nesting depth
Exit the loop if card < 0. No need to nest the actual code in the else
branch.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07 14:54:50 +01:00
Adrian Knoth
4c63a6b7be hdspmixer: Improve readability.
Group the statements into logical blocks.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07 14:54:41 +01:00
Adrian Knoth
d0d9470dee 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>
2011-02-07 14:54:30 +01:00
Adrian Knoth
f2bb47662d hdspmixer: Fix detection for non-MADIface RME cards
When adding RayDAT support, detection for cards like the 9652 was
accidently lost. This patch re-adds the missing bits.

Signed-off-by: Jörn Nettingsmeier <nettings@stackingdwarves.net>
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07 14:54:10 +01:00
Jaroslav Kysela
1dddbbf3f5 hdspmixer: add missing channelmap.h to Makefile.am
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-01-28 16:12:05 +01:00
Adrian Knoth
fda8bb066f 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>
2011-01-27 11:46:29 +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
Georg Rudolph
6af3047947 hdspmixer: Fix buffer overflow
A one off string buffer overflow fixed by handling it properly with
string stream.

Signed-off-by: Georg Rudolph <georg.rudolph@schwaben.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-05-15 12:00:27 +02:00
Diego 'Flameeyes' Pettenò
56970e8143 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>
2008-11-13 13:13:53 +01:00
Jaroslav Kysela
a726e5df68 Added configure target to global Makefile and gitcompile to EXTRA_DIST
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09 14:17:10 +02:00
Jaroslav Kysela
f0bb8866ce more gitcompile cleanups
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-19 19:22:20 +02:00
Jaroslav Kysela
880926b3cd gitcompile: return error return code and add GITCOMPILE_NO_MAKE condition
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-19 18:51:25 +02:00
Jaroslav Kysela
c989fddc7e hgcompile -> gitcompile changes (include README files) 2008-06-03 10:39:28 +02:00
Takashi Iwai
e56788b739 hdspmixer - Fix Digiface channel map for ADAT speed mode 1
Fixed the channel map for ADAT speed mode 1 (rate > 48000).
ALSA bug#3732
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3732
2008-02-05 13:30:45 +01:00
Takashi Iwai
18a3037d87 hdspmixer - small memory leak fix
ALSA bug#3687
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3687

the hdspmixer application leaks one memory block, a c-style string
which is obtained by snd_card_get_longname, but never freed ...
2008-01-29 13:22:33 +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
Takashi Iwai
31b5ee97f2 hdspmixer - Fix compilation with gcc4.3
Fixed the doubled parameter 'w'.  Yeah, gcc 4.3 is picky.
2007-10-22 15:16:35 +02:00
Takashi Iwai
2c1948764c hdspmixer - Fix duplicated parameters in function declaration
Fixed duplicated parameters in function declaration.
2006-05-31 15:08:46 +02:00
Takashi Iwai
e13da40b0e Add hgcompile scripts
Added hgcompile scripts.
2006-05-12 15:36:52 +02:00
Takashi Iwai
ef87719aec Fix exec permission of cvscompile and add .hgignore 2006-04-07 18:17:19 +02: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