Commit graph

536 commits

Author SHA1 Message Date
Jasmin Fazlic
c0e69055fa 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.

Signed-off-by: Jasmin Fazlic <superfassl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-27 09:24:08 +01:00
Jaroslav Kysela
82979c32e4 Release v1.2.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-19 10:35:44 +01:00
Takashi Iwai
534e7fac80 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.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-20 16:42:30 +01:00
Jaroslav Kysela
9ed2ebaaa7 Release v1.1.7
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-10-16 10:08:36 +02:00
Emmanuel Gil Peyrot
dc733d6b08 hwmixvolume: mention the new dependencies in the README
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20 09:09:18 +02:00
Emmanuel Gil Peyrot
88bd30b732 hwmixvolume: add my copyright
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20 09:09:08 +02:00
Emmanuel Gil Peyrot
fb043847de hwmixvolume: switch the shebang to python
This signifies that this code is now compatible with both Python 2 and
Python 3, as per PEP-0394[1].

[1] https://www.python.org/dev/peps/pep-0394/

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20 09:08:55 +02:00
Emmanuel Gil Peyrot
213b28a5aa hwmixvolume: use a with context to open files
This feature has been added in Python 2.5 and automatically closes an
open file once the context exits.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20 09:08:27 +02:00
Emmanuel Gil Peyrot
a21dda3d86 hwmixvolume: switch to GTK+ 3.0 and GLib 2.0
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.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20 09:07:56 +02:00
Emmanuel Gil Peyrot
0a9ad5c1e1 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.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20 09:07:04 +02:00
Emmanuel Gil Peyrot
50e9ac4e81 hwmixvolume: use four spaces instead of one tab for indent
This is the recommended coding style for all Python programs, as
specified in PEP-0008[1].

[1] https://www.python.org/dev/peps/pep-0008/

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20 09:06:11 +02:00
Ross Burton
235d9c5e83 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>
2018-06-12 14:30:58 +02:00
Khem Raj
a861bdabf0 us428control: Fix clang -Wreserved-user-defined-literal warnings
| us428control.cc:66:18: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
|         printf("usage: "PROGNAME" [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n");
|                         ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-24 21:32:03 +02:00
Jaroslav Kysela
66e74b6878 Release v1.1.6
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-04-03 09:01:37 +02:00
Tanu Kaskinen
a18c344525 hdajacksensetest: add gitcompile to EXTRA_DIST
The gitcompile script is used from the top-level Makefile, so it needs
to be included in the tarball.

Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-20 19:06:39 +01:00
Jaroslav Kysela
c92440aad8 Makefile: fix version file creation
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-15 12:59:58 +01:00
Jaroslav Kysela
882d4b1048 hwmixvolume: add .desktop and icon files
Resized version of public domain clipart found here:
  http://www.openclipart.org/detail/17428

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-15 12:59:43 +01:00
Jaroslav Kysela
39a388e01b envy24control: add .desktop and icon files
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-15 11:15:35 +01:00
Jaroslav Kysela
46eb8fb609 echomixer: add .desktop and icon files
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-15 11:15:27 +01:00
Jaroslav Kysela
ecf4884564 hdspconf: move .desktop and icon files to desktop, use modern destination for icons
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-15 11:15:12 +01:00
Jaroslav Kysela
962a07911c hdspmixer: move .desktop and icon files to desktop, use modern destination for icons
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-15 10:34:54 +01:00
Jaroslav Kysela
fc8858cae3 hdajackretask: add .desktop and icon files
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-15 10:34:16 +01:00
Jaroslav Kysela
089e69d880 hdspconf, hdspmixer: validate the .desktop files
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 17:37:58 +01:00
Jaroslav Kysela
38f7504af2 Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:47:19 +01:00
Jaroslav Kysela
2639ca055e hwmixvolume: use python2 directly
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:46:58 +01:00
Jaroslav Kysela
3f45efedad Release v1.1.5
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 08:52:10 +01:00
Takashi Sakamoto
f0ffe1b732 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.

This patch is tested with Echo Gina 3G.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-05 22:34:15 +01:00
Takashi Iwai
e926822747 as10k1: Drop superfluous inline prefix
output_tram_line() has a superfluous inline prefix and this interferes
the build with clang.  Let's drop it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-22 14:40:49 +02:00
Jaroslav Kysela
b01cf309bd Release v1.1.3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2016-12-20 10:12:29 +01:00
Michel Normand
70118f5f93 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>
2016-06-20 15:30:47 +02:00
Jaroslav Kysela
44f3750171 Release v1.1.0
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2015-10-27 14:34:05 +01:00
Takashi Iwai
ed9c1b7b4e Add */compile to .gitignore
Recent autotools give more garbages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-02 12:41:02 +02:00
Takashi Iwai
8a241fa7db Add some hdajacksensetest/* files to .gitignore
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-02 12:38:33 +02:00
Stéphane Aulery
471ba9b3cf cspctl.1: remove ".LO" macro. This macro don't exist for manpages syntax.
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-26 07:33:17 +01:00
Jaroslav Kysela
42b826d59f Release v1.0.29
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2015-02-26 13:35:49 +01:00
David Henningsson
9dca16c1fc hdajackretask: Add dock hp/mic/line to simple options
This allows for simpler setting of dock headphone, dock mic,
dock line out and dock line in.

Also improve detection a bit so that an existing dock headphone
shows up as such and not as regular headphone.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-13 17:47:12 +01:00
David Henningsson
7a7d94a031 Add a small "hdajacksensetest" helper
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>
2014-10-06 15:31:48 +02:00
David Henningsson
eb6408a791 hdajackretask: Add "hints" functionality
The kernel driver has some hints you can send to it that changes
parser behaviour. This patch exposes that functionality to the user.

(This patch also includes minor fixes for documentation, GTK warnings
and whitespace.)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04 11:07:01 +02:00
Takashi Iwai
406f80c968 ld10k1: Fix missing parentheses for functions
The commit a1728250 removes bash-specific "function" but the necessary
parentheses are missing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-27 16:48:33 +02:00
Jaroslav Kysela
c3eb62540f Release v1.0.28
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-13 11:28:13 +02:00
Jaroslav Kysela
1e7b6189d8 qlo10k1: packing fix (configure.ac) 2014-06-13 11:26:43 +02:00
Jaroslav Kysela
07896d3d16 Modernize configure.ac 2014-06-12 11:28:22 +02:00
David Henningsson
ab0104736c 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>
2014-05-27 09:28:54 +02:00
Adrian Knoth
f3c2688f9d hdspmixer: Add support for RME AIO AEB boards
AIO allows to connect Analogue Extension Boards (4in/4out).

Provide those channels in hdspmixer, too.

The channel maps were copied from the driver, hence the changed casing
in the comments.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05 12:01:44 +01:00
David Henningsson
772fbde91c hdajackretask: Fix killing PulseAudio on newer PulseAudio versions
The standard configuration directory for PulseAudio has changed,
I think since 3.0. Adjust the directory lookup mechanism to match.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-06-14 14:08:14 +02:00
Jordi Mallach
472c414744 Add AM_MAINTAINER_MODE([enable]) macro to all configure scripts.
Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:40:12 +02:00
Jordi Mallach
e79e2011ef Fix build errors caused by -Werror=format-security.
When compiled with hardening-flags enabled, ld10k1 fails to build due to
a pair of unsafe printf usages that trigger -Werror=format-security.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:40:06 +02:00
Elimar Riesebieter
a17282503f Fix bashisms.
The “function” builtin is a bashism that can be simply omitted with
no behaviour change, if parentheses are supplied.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:40:00 +02:00
Jordi Mallach
c1fdd7594b Fix spelling of “successfully”.
[additionally fixed a typo of "Crative" -- tiwai]

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:39:25 +02:00
Elimar Riesebieter
2fcce932b6 Add a distclean target to example Makefile.
Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:38:45 +02:00