Andreas Persson [Sun, 23 Mar 2025 12:56:29 +0000 (13:56 +0100)]
envy24control: simplify code by using gtk_widget_show_all
Remove all gtk_widget_show calls and replace it with just one
gtk_widget_show_all. This makes the code shorter and it will also help a
future port to GTK 4, where gtk_widget_show is gone.
Closes: https://github.com/alsa-project/alsa-tools/pull/29 Signed-off-by: Andreas Persson <andreasp56@outlook.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Andreas Persson [Sun, 23 Mar 2025 09:00:10 +0000 (10:00 +0100)]
envy24control: fix spdif output settings
The S/PDIF Output Settings in envy24control had some bugs: wrong bits
were set when user changed "Stream" under "Professional" or any of the
settings under "Consumer".
Closes: https://github.com/alsa-project/alsa-tools/pull/28 Signed-off-by: Andreas Persson <andreasp56@outlook.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
as10k1: make (extern) declarations and definition of macro_depth
All `extern` declarations refer to it as `unsigned int`, but the actual
definition is a signed integer.
Reported by CBMC's goto-cc compiler, which performs type-aware linking.
Closes: https://github.com/alsa-project/alsa-tools/pull/19 Signed-off-by: Michael Tautschnig <tautschn@amazon.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jasmin Fazlic [Sun, 7 Feb 2021 14:50:48 +0000 (15:50 +0100)]
hdspmixer: add output loopback buttons
This patch adds "LPBK" buttons to the output strip
channels allowing to toggle the hardware output
loopback state.
Efforts were made to hide the buttons for not yet
enabled devices but due to difficulties in implementation
was cancelled for the time being. Should it be a no-go
efforts should be made to fix this and hide them,
although I would think fixing the driver for other
devices would be an effort with much more merit.
We check whether the system has the kernel patch
applied by calling `HDSPMixerCard::supportsLoopback()`
and if not these buttons remain gray (off) and do
nothing when clicked.
Jasmin Fazlic [Sun, 7 Feb 2021 14:50:47 +0000 (15:50 +0100)]
hdspmixer: enhance saving of presets
Changing the version in the file header would make
a preset file not readable by older versions of the
tool. If we just append new data always at the end
of the save procedure we should have no problems
reading them with different versions, as they all
just read to a certain point and ignore the rest
of the file.
This patch implements the logic to save the presets
first to a file called file_name.tmp and appends any
extra data that would come after in a possibly present
file_name file.
Any data written by newer versions would remain in
the preset file and from now on no old version should
remove data written by newer versions.
Also since we write to a temporary file and rename
afterwards an extra feature is gained of not corrupting
the preset should we crash.
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>