Takashi Iwai [Fri, 20 Dec 2019 15:40:43 +0000 (16:40 +0100)]
hdspmixer: Use __u32 and __u64 for RMS array types
Some variable types are referring to the field in ioctl struct, which
are actually __u32 or __u64 instead of uint32_t or uint64_t.
This inconsistency may result in the compile error.
This replaces VBox and HBox with Grid (using Gtk.Orientation), HScale
with Scale, creates labels with mnemonics, set hexpand and vexpand
properly, use the correct enum container classes, use the correct getter
for size request, and finally update to the correct GLib watch function.
hwmixvolume: replace PyGTK with gobject-introspection
This doesn’t work yet, we require Gtk 3.0 rather than 2.0 and the API
changed quite a lot, so this is but a preparatory patch.
This is done so that we can get rid of GTK+ 2 which has been EOL for
many years already, and to add Python 3 support because Python 2 will
very soon be EOL as well.
Ross Burton [Tue, 12 Jun 2018 12:24:34 +0000 (13:24 +0100)]
ld10k1: define _GNU_SOURCE and use sighandler_t
__sighandler_t is a glibc internal type which doesn't exist in musl. By using
AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE defined, both glibc and musl
then expose sighandler_t.
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
echomixer: obsolete usage of dimension information
In current implementation for a series of echoaudio drivers, some control
element set delivers information to use element values for
multi-dimensional array. Essentially, ALSA control interface of asound.h
has no common way to parse the information. As a result, the drivers
forces 'echomixer' application to parse the information by several ways.
This issue was reported by a commit 51db452df07b ('Revert "ALSA: echoaudio:
purge contradictions between dimension matrix members and total number of
members"') to Linux kernel. As a result of discussion at Linux
miniconference 2017, usage of 'dimen' member of 'struct snd_ctl_elem_info'
is going to be deprecated for future removal.
According to the above decision, this commit obsoletes usage of 'dimen'
information in 'echomixer' application. In a series of echoaudio drivers,
a control element set named as 'Channels info' includes duplicated
information of the dimension information on value array. Additionally,
some of dimension information have fixed values. This commit utilizes them
to obsolete usage of dimension information.
Michel Normand [Mon, 20 Jun 2016 13:26:06 +0000 (15:26 +0200)]
gcc6 narrowing error
gcc6 narrowing error compiling for PowerPC archi
===
[ 51s] Cus428Midi.cc: At global scope:
[ 51s] Cus428Midi.cc:83:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
[ 51s] };
===
proposed patch as suggested in
https://gcc.gnu.org/gcc-6/porting_to.html
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
I previously had a small python script doing the same thing,
but it depended on hda-analyzer, which always breaks when something
new is added to the codec proc file.
I got tired and rewrote it as a small C program instead, which I
hope will be a useful addition to alsa-tools.
Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
hdajackretask: Make sure codecs do not show up twice under 3.15 kernel
On a 3.15 based kernel, both "hdaudioC*D*" and "hwC*D*" shows up under
/sys/class/sound, and pointing to the same object. Make sure we only
match on the hwC*D* name to avoid duplicate entries.
Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
hdajackretask: Add new program for easy retask of hda pin nodes
Most HDA Intel soundcards are to some degree retaskable, i e can be
used for more than one thing. This tool is a GUI to make it easy to
retask your jacks - e g, turn your Mic jack into an extra Headphone,
or why not make them both line outs and connect them to your surround
receiver?
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Adrian Knoth [Fri, 29 Jul 2011 15:57:30 +0000 (17:57 +0200)]
hdspmixer: Fix temporary RPM constant
RPM in hdsp.h's HDSP_IO_Type is 4, not 5. This patch isn't exactly
necessary here, because the constant is only used internally, but to
avoid confusion if somebody ever reads the code, let's use the correct
value.
Note that we'll drop it after the next alsa-lib release.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 28 Jul 2011 21:45:48 +0000 (23:45 +0200)]
hdsploader: Temporary define for RPM
Right now (1.0.24.1), alsa-lib's hdsp.h doesn't know about the RPM. To
avoid a strong dependency on unreleased code, temporary provide the
define here.
It can be dropped as soon as a new version of alsa-lib will be released,
thus effectively making it the required minimum version for alsa-tools.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 28 Jul 2011 21:45:46 +0000 (23:45 +0200)]
hdspmixer: Add support for RME RPM
This patch adds support for the RME RPM devices. It's mostly based on
Florian Faber's previous patch against hdspmixer 1.0.23,
forwarded-ported to the current hdspmixer code.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Fri, 8 Apr 2011 17:58:36 +0000 (19:58 +0200)]
hdspmixer: Handle channel count in old (v1.0.23) preset file format
When reading a preset file, v1.0.23 only used 26 channels instead of 64.
Reading 64 channels from a 26 channel file won't work, hence set it
depending on the file format version.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Fri, 8 Apr 2011 17:58:35 +0000 (19:58 +0200)]
hdspmixer: Fix read/write from/to preset files on MADI-like cards
The old hdspmixer (prior to e24e56795ea57e3dd7da45063ab71f04e231192d,
that is pre-1.0.24) has used the hard-coded value "14" for
reading/storing 14 ints from/to preset files, however, it's actually
HDSP_MAX_DEST that should be used.
HDSP_MAX_DEST was bumped from 14 to 32 to allow for MADI cards (32
stereo pairs equal 64 output channels on MADI cards)
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Mon, 4 Apr 2011 12:34:30 +0000 (14:34 +0200)]
hdspmixer: Initialize headphones out in presets
Cards like the multiface/digiface have additional headphones out. Those
were not initialized in the presets due to wrong loop boundaries:
maxdest represents the amount of physical stereo pairs, and chnls is
either equal or less, so the output fader array needs more iterations
than the playback section.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Mon, 4 Apr 2011 12:34:29 +0000 (14:34 +0200)]
hdspmixer: Recall 1st preset on all cards, not just on the first
With the new "store current settings to the virtual 9th preset" before
switching cards code, one needs to make sure the actual mixer state is
loaded with sane values, either from the preset file or a generic
builtin preset.
Calling preset_change(1) is sufficient, setting all the required data.
However, in case of more than one RME card in the system, one needs to
call this function for each card, otherwise, some of the cards store
uninitialized data to the 9th preset, resulting in a weird mixer state
afterwards.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Mon, 4 Apr 2011 12:34:28 +0000 (14:34 +0200)]
hdspmixer: Save preset before switching cards
When running with more than one card, switching cards would lose any
changes made to the current card. To avoid this inconvenience, save the
current settings to the virtual 9th preset and restore them when
switching back.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Mon, 4 Apr 2011 12:34:27 +0000 (14:34 +0200)]
hdspmixer: Add a 9th pseudo preset
When switching cards, all current settings are lost. To have a place
where to store them, let's add a virtual 9th preset which can be used as
a temporary scratch pad.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Tue, 22 Mar 2011 10:53:47 +0000 (11:53 +0100)]
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>
Adrian Knoth [Mon, 7 Mar 2011 18:03:08 +0000 (19:03 +0100)]
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>