forked from pool/alsa-utils
Accepting request 558223 from home:tiwai:branches:multimedia:libs
- Get rid of superfluous patch for ancient distros: alsa-utils-gettext-version-removal.diff - Remove superfluous file override, which is already included in the 1.1.5 tarball: alsaucm.rst - Backport upstream fixes: 0001-aplay-Adjust-sample-rate-limits-to-support-newer-har.patch 0002-alsactl-Only-start-restore-service-when-asoundrc-fil.patch - Cleanup specfile to rip off the too old kludges OBS-URL: https://build.opensuse.org/request/show/558223 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=143
This commit is contained in:
parent
c5ce675a4d
commit
140960a8cc
@ -0,0 +1,35 @@
|
||||
From d0802f32cafa8ba8ff4d48e3eb1f690b7adb0d3d Mon Sep 17 00:00:00 2001
|
||||
From: Jussi Laako <jussi@sonarnerd.net>
|
||||
Date: Thu, 7 Dec 2017 13:57:14 +0200
|
||||
Subject: [PATCH] aplay: Adjust sample rate limits to support newer hardware
|
||||
|
||||
There are number of devices that support up to 384 kHz sampling rate and
|
||||
some devices up to 768 kHz sampling rate. This patch increases sanity
|
||||
check limit to 768k in order to support testing of such hardware.
|
||||
|
||||
Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
aplay/aplay.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/aplay/aplay.c b/aplay/aplay.c
|
||||
index dbae17caf3a4..6b740c281f8e 100644
|
||||
--- a/aplay/aplay.c
|
||||
+++ b/aplay/aplay.c
|
||||
@@ -635,10 +635,10 @@ int main(int argc, char *argv[])
|
||||
error(_("invalid rate argument '%s'"), optarg);
|
||||
return 1;
|
||||
}
|
||||
- if (tmp < 300)
|
||||
+ if (tmp < 1000)
|
||||
tmp *= 1000;
|
||||
rhwparams.rate = tmp;
|
||||
- if (tmp < 2000 || tmp > 192000) {
|
||||
+ if (tmp < 2000 || tmp > 768000) {
|
||||
error(_("bad speed value %i"), tmp);
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.15.1
|
||||
|
@ -0,0 +1,43 @@
|
||||
From f1eba0b5deb6c3988d6dd7317ccc931c09792843 Mon Sep 17 00:00:00 2001
|
||||
From: Ikey Doherty <ikey@solus-project.com>
|
||||
Date: Tue, 12 Dec 2017 13:32:34 +0000
|
||||
Subject: [PATCH] alsactl: Only start restore service when asoundrc file exists
|
||||
|
||||
This solves the chicken and egg problem on fresh installations whereby
|
||||
the alsa state file does not yet exist, and alsa-restore unit attempted
|
||||
to launch without first having a state file.
|
||||
|
||||
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
alsactl/Makefile.am | 1 +
|
||||
alsactl/alsa-restore.service.in | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
|
||||
index 90fab9d13ccc..aaaf74ee1e18 100644
|
||||
--- a/alsactl/Makefile.am
|
||||
+++ b/alsactl/Makefile.am
|
||||
@@ -41,6 +41,7 @@ edit = \
|
||||
$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
|
||||
-e 's,@mydatadir\@,$(mydatadir),g' \
|
||||
-e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
|
||||
+ -e 's,@asoundrcfile\@,$(ASOUND_STATE_DIR)/asound.state,g' \
|
||||
< $< > $@ || rm $@
|
||||
|
||||
alsa-state.service: alsa-state.service.in
|
||||
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
|
||||
index 80fd5fd48203..a84c2e842444 100644
|
||||
--- a/alsactl/alsa-restore.service.in
|
||||
+++ b/alsactl/alsa-restore.service.in
|
||||
@@ -7,6 +7,7 @@
|
||||
Description=Save/Restore Sound Card State
|
||||
ConditionPathExists=!@daemonswitch@
|
||||
ConditionPathExistsGlob=/dev/snd/control*
|
||||
+ConditionPathExists=@asoundrcfile@
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
--
|
||||
2.15.1
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -r ff4c1a926a82 configure.in
|
||||
--- a/configure.in Mon Jun 04 15:15:39 2007 +0200
|
||||
+++ b/configure.in Wed Jun 06 14:25:19 2007 +0200
|
||||
@@ -5,7 +5,7 @@ AM_INIT_AUTOMAKE(alsa-utils, 1.0.14)
|
||||
AM_INIT_AUTOMAKE(alsa-utils, 1.0.14)
|
||||
|
||||
AM_GNU_GETTEXT([external])
|
||||
-AM_GNU_GETTEXT_VERSION([0.15])
|
||||
+dnl AM_GNU_GETTEXT_VERSION([0.15])
|
||||
|
||||
dnl Checks for programs.
|
||||
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 18 17:33:17 CET 2017 - tiwai@suse.de
|
||||
|
||||
- Get rid of superfluous patch for ancient distros:
|
||||
alsa-utils-gettext-version-removal.diff
|
||||
- Remove superfluous file override, which is already included in
|
||||
the 1.1.5 tarball:
|
||||
alsaucm.rst
|
||||
- Backport upstream fixes:
|
||||
0001-aplay-Adjust-sample-rate-limits-to-support-newer-har.patch
|
||||
0002-alsactl-Only-start-restore-service-when-asoundrc-fil.patch
|
||||
- Cleanup specfile to rip off the too old kludges
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 14 15:03:33 CET 2017 - tiwai@suse.de
|
||||
|
||||
|
@ -43,9 +43,8 @@ Group: Productivity/Multimedia/Sound/Players
|
||||
Url: http://www.alsa-project.org/
|
||||
Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-%{package_version}.tar.bz2
|
||||
Source1: 01beep.conf
|
||||
Source2: alsaucm.rst
|
||||
# Patch: alsa-utils-git-fixes.diff
|
||||
Patch99: alsa-utils-gettext-version-removal.diff
|
||||
Patch1: 0001-aplay-Adjust-sample-rate-limits-to-support-newer-har.patch
|
||||
Patch2: 0002-alsactl-Only-start-restore-service-when-asoundrc-fil.patch
|
||||
BuildRequires: alsa-devel
|
||||
BuildRequires: automake
|
||||
BuildRequires: fftw3-devel
|
||||
@ -82,20 +81,11 @@ and test audio before and after PM state changes.
|
||||
%setup -q -n %{name}-%{package_version}
|
||||
# fix stupid automake's automatic action
|
||||
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
|
||||
# rm -f po/Makefile* po/*.gmo po/*.pot po/*.header po/stamp-*
|
||||
# patch -p1
|
||||
#
|
||||
%if 0%{?suse_version} < 1020
|
||||
%patch99 -p1
|
||||
%endif
|
||||
# copy the missing file
|
||||
cp %{S:2} alsaucm/
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
export AUTOMAKE_JOBS="%{?_smp_mflags}"
|
||||
%if 0%{?suse_version} < 1020
|
||||
# gettextize -f
|
||||
%endif
|
||||
autoreconf -fi
|
||||
opts=""
|
||||
%if %{use_systemd}
|
||||
@ -104,9 +94,6 @@ opts="$opts --with-systemdsystemunitdir=%{_unitdir}"
|
||||
%if ! %{use_varlib}
|
||||
opts="$opts --with-asound-state-dir=/etc"
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1030
|
||||
opts="$opts --disable-xmlto"
|
||||
%endif
|
||||
opts="$opts --with-udev-rules-dir=%{_udevdir}/rules.d"
|
||||
%configure --with-curses=ncursesw $opts
|
||||
make %{?_smp_mflags}
|
||||
|
235
alsaucm.rst
235
alsaucm.rst
@ -1,235 +0,0 @@
|
||||
=========
|
||||
alsaucm
|
||||
=========
|
||||
|
||||
---------------------
|
||||
ALSA Use Case Manager
|
||||
---------------------
|
||||
|
||||
:Author: Antonio Ospite <ao2@ao2.it>
|
||||
:Date: 2016-09-22
|
||||
:Copyright: GPLv2+
|
||||
:Manual section: 1
|
||||
:Manual group: General Commands Manual
|
||||
|
||||
SYNOPSIS
|
||||
========
|
||||
|
||||
*alsaucm* <options> [command]
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
|
||||
alsaucm (ALSA Use Case Manager) is a program to use the ALSA `Use Case
|
||||
Interface`_ from the command line.
|
||||
|
||||
On complex sound cards, setting up audio routes is not trivial and mixer
|
||||
settings can conflict one another preventing the audio card to work at all.
|
||||
|
||||
The ALSA Use Case Manager is a mechanism for controlling complex audio
|
||||
hardware establishing a relationship between hardware configurations and
|
||||
meaningful use cases that the end-user can relate with.
|
||||
|
||||
The use case manager can also be used to switch between use cases when
|
||||
necessary, in a consistent way.
|
||||
|
||||
At a lower level, the use case manager works by configuring the sound card
|
||||
ALSA kcontrols to change the hardware digital and analog audio routing to
|
||||
match the requested device use case.
|
||||
|
||||
The use case manager kcontrol configurations are stored in easy to modify text
|
||||
files. An audio use case can be defined by a **verb** and **device** parameter.
|
||||
|
||||
The verb describes the use case action i.e. a phone call, listening to music,
|
||||
recording a conversation etc. The device describes the physical audio capture
|
||||
and playback hardware i.e. headphones, phone handset, bluetooth headset, etc.
|
||||
|
||||
|
||||
OPTIONS
|
||||
=======
|
||||
|
||||
Available options:
|
||||
|
||||
**-h**, **--help**
|
||||
this help
|
||||
|
||||
**-c**, **--card** `NAME`
|
||||
open card NAME
|
||||
|
||||
**-i**, **--interactive**
|
||||
interactive mode
|
||||
|
||||
**-b**, **--batch** `FILE`
|
||||
batch mode (use ``'-'`` for the stdin input)
|
||||
|
||||
**-n**, **--no-open**
|
||||
do not open first card found
|
||||
|
||||
|
||||
Available commands:
|
||||
|
||||
``open`` `NAME`
|
||||
open card NAME.
|
||||
|
||||
valid names are sound card names as listed in ``/usr/share/alsa/ucm``.
|
||||
|
||||
``reset``
|
||||
reset sound card to default state.
|
||||
|
||||
``reload``
|
||||
reload configuration.
|
||||
|
||||
``listcards``
|
||||
list available cards.
|
||||
|
||||
``list`` `IDENTIFIER`
|
||||
list command, for items returning two entries (value+comment).
|
||||
|
||||
the value of the `IDENTIFIER` argument can can be:
|
||||
|
||||
- ``_verbs`` - get verb list (in pair verb+comment)
|
||||
- ``_devices[/{verb}]`` - get list of supported devices (in pair device+comment)
|
||||
- ``_modifiers[/{verb}]`` - get list of supported modifiers (in pair modifier+comment)
|
||||
|
||||
The forms without the trailing ``/{verb}`` are valid only after a specific
|
||||
verb has been set.
|
||||
|
||||
``list1`` `IDENTIFIER`
|
||||
list command, for lists returning one item per entry.
|
||||
|
||||
the value of the `IDENTIFIER` argument can vary depending on the context,
|
||||
it can be:
|
||||
|
||||
- ``TQ[/{verb}]`` - get list of Tone Quality identifiers
|
||||
- ``_enadevs`` - get list of enabled devices
|
||||
- ``_enamods`` - get list of enabled modifiers
|
||||
- ``_supporteddevs/{modifier}|{device}[/{verb}]`` - list of supported devices
|
||||
- ``_conflictingdevs/{modifier}|{device}[/{verb}]`` - list of conflicting devices
|
||||
|
||||
``get`` `IDENTIFIER`
|
||||
get string value.
|
||||
|
||||
the value of the `IDENTIFIER` argument can can be:
|
||||
|
||||
- ``_verb`` - return current verb
|
||||
- ``[=]{NAME}[/[{modifier}|{/device}][/{verb}]]`` (For valid NAMEs look at the
|
||||
ALSA `Use Case Interface`_)
|
||||
|
||||
|
||||
``geti`` `IDENTIFIER`
|
||||
get integer value.
|
||||
|
||||
the value of the `IDENTIFIER` argument can can be:
|
||||
|
||||
- ``_devstatus/{device}``
|
||||
- ``_modtstaus/{device}``
|
||||
|
||||
``set`` `IDENTIFIER` `VALUE`
|
||||
set string value
|
||||
|
||||
The value of the `IDENTIFIER` argument can can be:
|
||||
|
||||
- ``_verb`` - set the verb to `VALUE`
|
||||
- ``_enadev`` - enable the device specified by `VALUE`
|
||||
- ``_disdev`` - disable the device specified by `VALUE`
|
||||
- ``_swdev/{old_device}`` - switche device:
|
||||
|
||||
- disable `old_device` and then enable the device specified by
|
||||
`VALUE`
|
||||
- if no device was enabled just return
|
||||
|
||||
- ``_enamod`` - enable the modifier specified by `VALUE`
|
||||
- ``_dismod`` - disable the modifier specified by `VALUE`
|
||||
- ``_swmod/{old_modifier}`` - switch modifier:
|
||||
|
||||
- disable `old_modifier` and then enable the modifier specified by
|
||||
`VALUE`
|
||||
- if no modifier was enabled just return
|
||||
|
||||
Note that the identifiers referring to devices and modifiers are valid
|
||||
only after setting a verb.
|
||||
|
||||
``h``, ``help``
|
||||
help
|
||||
|
||||
``q``, ``quit``
|
||||
quit
|
||||
|
||||
|
||||
FILES
|
||||
=====
|
||||
|
||||
The master use case files for each supported sound card are in ``/usr/share/alsa/ucm``.
|
||||
|
||||
For example, the master use case file for the `Pandaboard` card is in
|
||||
``/usr/share/alsa/ucm/PandaBoard/PandaBoard.conf``, this file lists all the
|
||||
supported use cases, e.g.
|
||||
|
||||
::
|
||||
|
||||
SectionUseCase."HiFi" {
|
||||
File "hifi"
|
||||
Comment "Play HiFi quality Music."
|
||||
}
|
||||
...
|
||||
|
||||
|
||||
Each use case defines a _verb, which is described in the file specified in
|
||||
the ``File`` directive, like above.
|
||||
|
||||
The ``HiFi`` verb above is described in
|
||||
``/usr/share/alsa/ucm/PandaBoard/hifi``.
|
||||
|
||||
For more details on the syntax of UCM files, see the alsa-lib source code:
|
||||
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/ucm/parser.c
|
||||
|
||||
|
||||
EXAMPLES OF USE
|
||||
===============
|
||||
|
||||
Some commands, like for instance ``list _devices``,
|
||||
can only work after setting a ``_verb`` in the **same execution**, for
|
||||
instance this sequence doesn't work:
|
||||
|
||||
::
|
||||
|
||||
# alsaucm -c bytcr-rt5640 set _verb HiFi
|
||||
# alsaucm -c bytcr-rt5640 list _devices
|
||||
|
||||
|
||||
However this command does:
|
||||
|
||||
::
|
||||
|
||||
# alsaucm -n -b - <<EOM
|
||||
open bytcr-rt5640
|
||||
set _verb HiFi
|
||||
list _devices
|
||||
EOM
|
||||
|
||||
|
||||
An example of setting the `Speaker` device for the `HiFi` verb of the
|
||||
`bytcr-rt5640` card:
|
||||
|
||||
::
|
||||
|
||||
# alsaucm -n -b - <<EOM
|
||||
open bytcr-rt5640
|
||||
reset
|
||||
set _verb HiFi
|
||||
set _enadev Speaker
|
||||
EOM
|
||||
|
||||
|
||||
|
||||
SEE ALSO
|
||||
========
|
||||
|
||||
* Use Case Interface: http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html
|
||||
|
||||
.. _Use Case Interface: http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html
|
||||
|
||||
BUGS
|
||||
====
|
||||
|
||||
None known.
|
Loading…
Reference in New Issue
Block a user