Accepting request 308373 from multimedia:libs
1 OBS-URL: https://build.opensuse.org/request/show/308373 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa?expand=0&rev=161
This commit is contained in:
commit
915efc0737
33
0001-ucm-document-some-standard-values.patch
Normal file
33
0001-ucm-document-some-standard-values.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From c56064e13556322e868c5014a7fb3d0933a97a4f Mon Sep 17 00:00:00 2001
|
||||
From: "Lu, Han" <han.lu@intel.com>
|
||||
Date: Thu, 5 Mar 2015 08:38:54 +0800
|
||||
Subject: [PATCH 01/16] ucm: document some standard values
|
||||
|
||||
add standard value JackDev, JackControl and JackHWMute for speaker
|
||||
mute control on jack insertion. These values will be applied on
|
||||
pulseaudio.
|
||||
|
||||
Signed-off-by: Lu, Han <han.lu@intel.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
include/use-case.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/include/use-case.h b/include/use-case.h
|
||||
index 697377a109e2..3728906ec83d 100644
|
||||
--- a/include/use-case.h
|
||||
+++ b/include/use-case.h
|
||||
@@ -284,6 +284,10 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
|
||||
* PlaybackMixerID - mixer playback ID
|
||||
* CaptureMixer - name of capture mixer
|
||||
* CaptureMixerID - mixer capture ID
|
||||
+ * JackDev - jack device name
|
||||
+ * JackControl - jack control name
|
||||
+ * JackHWMute - indicate if the HW mutes a device on jack insertion
|
||||
+ * or not.
|
||||
*/
|
||||
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
||||
const char *identifier,
|
||||
--
|
||||
2.4.1
|
||||
|
168
0002-conf-ucm-broadwell-rt286-add-ucm-config.patch
Normal file
168
0002-conf-ucm-broadwell-rt286-add-ucm-config.patch
Normal file
@ -0,0 +1,168 @@
|
||||
From 3c263716fd5bd2d9d5308cb13dba667d138c0097 Mon Sep 17 00:00:00 2001
|
||||
From: Bard Liao <bardliao@realtek.com>
|
||||
Date: Thu, 5 Mar 2015 08:38:55 +0800
|
||||
Subject: [PATCH 02/16] conf/ucm: broadwell-rt286: add ucm config
|
||||
|
||||
The configure should apply to all Broadwell-rt286 boards from Intel,
|
||||
like Wilson Beach SDS Ultrabook.
|
||||
|
||||
Signed-off-by: Lu, Han <han.lu@intel.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/ucm/broadwell-rt286/HiFi | 128 ++++++++++++++++++++++
|
||||
src/conf/ucm/broadwell-rt286/broadwell-rt286.conf | 8 ++
|
||||
2 files changed, 136 insertions(+)
|
||||
create mode 100644 src/conf/ucm/broadwell-rt286/HiFi
|
||||
create mode 100644 src/conf/ucm/broadwell-rt286/broadwell-rt286.conf
|
||||
|
||||
diff --git a/src/conf/ucm/broadwell-rt286/HiFi b/src/conf/ucm/broadwell-rt286/HiFi
|
||||
new file mode 100644
|
||||
index 000000000000..08f5c50db405
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/broadwell-rt286/HiFi
|
||||
@@ -0,0 +1,128 @@
|
||||
+# Use case Configuration for Nexus 7
|
||||
+# Adapted to Ubuntu Touch by David Henningsson <david.henningsson@canonical.com>
|
||||
+
|
||||
+SectionVerb {
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ ]
|
||||
+
|
||||
+ # ALSA PCM
|
||||
+ Value {
|
||||
+ # ALSA PCM device for HiFi
|
||||
+ PlaybackPCM "hw:broadwellrt286"
|
||||
+ CapturePCM "hw:broadwellrt286"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Headphones" {
|
||||
+ Comment "Headphones playback"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Speaker"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+ cset "name='Master Playback Volume' 30"
|
||||
+ cset "name='HPO L Switch' on"
|
||||
+ cset "name='HPO R Switch' on"
|
||||
+ cset "name='Headphone Jack Switch' on"
|
||||
+ cset "name='DAC0 Playback Volume' 100"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+ cset "name='Headphone Jack Switch' off"
|
||||
+ cset "name='HPO L Switch' off"
|
||||
+ cset "name='HPO R Switch' off"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ JackDev "rt286-jack"
|
||||
+ JackControl "Headset Jack"
|
||||
+ JackHWMute "Speaker"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Speaker" {
|
||||
+ Comment "Speaker playback"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Headphones"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+ cset "name='Master Playback Volume' 30"
|
||||
+ cset "name='DAC0 Playback Volume' 127"
|
||||
+ cset "name='SPO Switch' on"
|
||||
+ cset "name='Speaker Playback Switch' on"
|
||||
+ cset "name='Speaker Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+ cset "name='Speaker Switch' off"
|
||||
+ cset "name='Speaker Playback Switch' off"
|
||||
+ cset "name='SPO Switch' 0"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Handset" {
|
||||
+ Comment "Handset Microphone"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Mainmic"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+
|
||||
+ cset "name='ADC 0 Mux' 0"
|
||||
+ cset "name='ADC0 Capture Switch' on"
|
||||
+ cset "name='ADC0 Capture Volume' 127"
|
||||
+ cset "name='AMIC Volume' 1"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+ cset "name='ADC0 Capture Switch' off"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Mainmic" {
|
||||
+ Comment "Main Microphone"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Handset"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+
|
||||
+ cset "name='ADC 0 Mux' 2"
|
||||
+ cset "name='ADC0 Capture Switch' on"
|
||||
+ cset "name='ADC0 Capture Volume' 127"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+ cset "name='ADC0 Capture Switch' off"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf b/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf
|
||||
new file mode 100644
|
||||
index 000000000000..4a176cd9a995
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf
|
||||
@@ -0,0 +1,8 @@
|
||||
+SectionUseCase."HiFi" {
|
||||
+ File "HiFi"
|
||||
+ Comment "Play HiFi quality Music"
|
||||
+}
|
||||
+
|
||||
+SectionDefaults [
|
||||
+ cdev "hw:broadwellrt286"
|
||||
+]
|
||||
--
|
||||
2.4.1
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 9d649add08beb93728ba2943a2c05f8f160f8296 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 5 Mar 2015 11:03:56 +0100
|
||||
Subject: [PATCH 03/16] conf/ucm: Add Makefile.am for broadwell-rt286 ucm
|
||||
config
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
src/conf/ucm/Makefile.am | 2 +-
|
||||
src/conf/ucm/broadwell-rt286/Makefile.am | 4 ++++
|
||||
3 files changed, 6 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/conf/ucm/broadwell-rt286/Makefile.am
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f0995e3ae787..9621d4e9ec2b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -655,6 +655,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
||||
src/conf/ucm/tegraalc5632/Makefile \
|
||||
src/conf/ucm/PAZ00/Makefile \
|
||||
src/conf/ucm/GoogleNyan/Makefile \
|
||||
+ src/conf/ucm/broadwell-rt286/Makefile \
|
||||
modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
|
||||
alsalisp/Makefile aserver/Makefile \
|
||||
test/Makefile test/lsb/Makefile \
|
||||
diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
|
||||
index 14fc7aee8e6c..e6a6325b5fdc 100644
|
||||
--- a/src/conf/ucm/Makefile.am
|
||||
+++ b/src/conf/ucm/Makefile.am
|
||||
@@ -1 +1 @@
|
||||
-SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan
|
||||
+SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286
|
||||
diff --git a/src/conf/ucm/broadwell-rt286/Makefile.am b/src/conf/ucm/broadwell-rt286/Makefile.am
|
||||
new file mode 100644
|
||||
index 000000000000..73861faaf7a6
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/broadwell-rt286/Makefile.am
|
||||
@@ -0,0 +1,4 @@
|
||||
+alsaconfigdir = @ALSA_CONFIG_DIR@
|
||||
+ucmdir = $(alsaconfigdir)/ucm/broadwell-rt286
|
||||
+ucm_DATA = broadwell-rt286.conf HiFi
|
||||
+EXTRA_DIST = $(ucm_DATA)
|
||||
--
|
||||
2.4.1
|
||||
|
154
0004-ucm-reformat-snd_use_case_get-doc.patch
Normal file
154
0004-ucm-reformat-snd_use_case_get-doc.patch
Normal file
@ -0,0 +1,154 @@
|
||||
From 72aa0f8332fb945c4179450f65402ce1cb389594 Mon Sep 17 00:00:00 2001
|
||||
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
|
||||
Date: Thu, 5 Mar 2015 14:51:57 +0200
|
||||
Subject: [PATCH 04/16] ucm: reformat snd_use_case_get() doc
|
||||
|
||||
Doxygen doesn't preserve formatting that relies only on indentation.
|
||||
This fixes it by using lists more liberally.
|
||||
|
||||
There are probably more places to fix than just
|
||||
snd_use_case_get_list(), but I only have motivation for fixing this
|
||||
function's documentation formatting (the next patch will add some more
|
||||
content to the function's documentation).
|
||||
|
||||
Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
include/use-case.h | 111 +++++++++++++++++++++++++++++++----------------------
|
||||
1 file changed, 65 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/include/use-case.h b/include/use-case.h
|
||||
index 3728906ec83d..d30952245fde 100644
|
||||
--- a/include/use-case.h
|
||||
+++ b/include/use-case.h
|
||||
@@ -229,10 +229,10 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
|
||||
* "const", but it's too late to fix it, sorry about that.)
|
||||
*
|
||||
* Known identifiers:
|
||||
- * NULL - return current card
|
||||
- * _verb - return current verb
|
||||
+ * - NULL - return current card
|
||||
+ * - _verb - return current verb
|
||||
*
|
||||
- * [=]{NAME}[/[{modifier}|{/device}][/{verb}]]
|
||||
+ * - [=]{NAME}[/[{modifier}|{/device}][/{verb}]]
|
||||
* - value identifier {NAME}
|
||||
* - Search starts at given modifier or device if any,
|
||||
* else at a verb
|
||||
@@ -243,51 +243,70 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
|
||||
* device/modifier/verb specified, and not search
|
||||
* through each object in turn.
|
||||
* - Examples:
|
||||
- * "PlaybackPCM/Play Music"
|
||||
- * "CapturePCM/SPDIF"
|
||||
- * From ValueDefaults only:
|
||||
- * "=Variable"
|
||||
- * From current active verb:
|
||||
- * "=Variable//"
|
||||
- * From verb "Verb":
|
||||
- * "=Variable//Verb"
|
||||
- * From "Modifier" in current active verb:
|
||||
- * "=Variable/Modifier/"
|
||||
- * From "Modifier" in "Verb":
|
||||
- * "=Variable/Modifier/Verb"
|
||||
+ * - "PlaybackPCM/Play Music"
|
||||
+ * - "CapturePCM/SPDIF"
|
||||
+ * - From ValueDefaults only:
|
||||
+ * "=Variable"
|
||||
+ * - From current active verb:
|
||||
+ * "=Variable//"
|
||||
+ * - From verb "Verb":
|
||||
+ * "=Variable//Verb"
|
||||
+ * - From "Modifier" in current active verb:
|
||||
+ * "=Variable/Modifier/"
|
||||
+ * - From "Modifier" in "Verb":
|
||||
+ * "=Variable/Modifier/Verb"
|
||||
*
|
||||
* Recommended names for values:
|
||||
- * TQ - Tone Quality
|
||||
- * PlaybackPCM - full PCM playback device name
|
||||
- * PlaybackPCMIsDummy - Valid values: "yes" and "no". If set to "yes", the
|
||||
- * PCM named by the PlaybackPCM value is a dummy device,
|
||||
- * meaning that opening it enables an audio path in the
|
||||
- * hardware, but writing to the PCM device has no
|
||||
- * effect.
|
||||
- * CapturePCM - full PCM capture device name
|
||||
- * CapturePCMIsDummy - Valid values: "yes" and "no". If set to "yes", the
|
||||
- * PCM named by the CapturePCM value is a dummy device,
|
||||
- * meaning that opening it enables an audio path in the
|
||||
- * hardware, but reading from the PCM device has no
|
||||
- * effect.
|
||||
- * PlaybackRate - playback device sample rate
|
||||
- * PlaybackChannels - playback device channel count
|
||||
- * PlaybackCTL - playback control device name
|
||||
- * PlaybackVolume - playback control volume ID string
|
||||
- * PlaybackSwitch - playback control switch ID string
|
||||
- * CaptureRate - capture device sample rate
|
||||
- * CaptureChannels - capture device channel count
|
||||
- * CaptureCTL - capture control device name
|
||||
- * CaptureVolume - capture control volume ID string
|
||||
- * CaptureSwitch - capture control switch ID string
|
||||
- * PlaybackMixer - name of playback mixer
|
||||
- * PlaybackMixerID - mixer playback ID
|
||||
- * CaptureMixer - name of capture mixer
|
||||
- * CaptureMixerID - mixer capture ID
|
||||
- * JackDev - jack device name
|
||||
- * JackControl - jack control name
|
||||
- * JackHWMute - indicate if the HW mutes a device on jack insertion
|
||||
- * or not.
|
||||
+ * - TQ
|
||||
+ * - Tone Quality
|
||||
+ * - PlaybackPCM
|
||||
+ * - full PCM playback device name
|
||||
+ * - PlaybackPCMIsDummy
|
||||
+ * - Valid values: "yes" and "no". If set to "yes", the PCM named by the
|
||||
+ * PlaybackPCM value is a dummy device, meaning that opening it enables
|
||||
+ * an audio path in the hardware, but writing to the PCM device has no
|
||||
+ * effect.
|
||||
+ * - CapturePCM
|
||||
+ * - full PCM capture device name
|
||||
+ * - CapturePCMIsDummy
|
||||
+ * - Valid values: "yes" and "no". If set to "yes", the PCM named by the
|
||||
+ * CapturePCM value is a dummy device, meaning that opening it enables
|
||||
+ * an audio path in the hardware, but reading from the PCM device has no
|
||||
+ * effect.
|
||||
+ * - PlaybackRate
|
||||
+ * - playback device sample rate
|
||||
+ * - PlaybackChannels
|
||||
+ * - playback device channel count
|
||||
+ * - PlaybackCTL
|
||||
+ * - playback control device name
|
||||
+ * - PlaybackVolume
|
||||
+ * - playback control volume ID string
|
||||
+ * - PlaybackSwitch
|
||||
+ * - playback control switch ID string
|
||||
+ * - CaptureRate
|
||||
+ * - capture device sample rate
|
||||
+ * - CaptureChannels
|
||||
+ * - capture device channel count
|
||||
+ * - CaptureCTL
|
||||
+ * - capture control device name
|
||||
+ * - CaptureVolume
|
||||
+ * - capture control volume ID string
|
||||
+ * - CaptureSwitch
|
||||
+ * - capture control switch ID string
|
||||
+ * - PlaybackMixer
|
||||
+ * - name of playback mixer
|
||||
+ * - PlaybackMixerID
|
||||
+ * - mixer playback ID
|
||||
+ * - CaptureMixer
|
||||
+ * - name of capture mixer
|
||||
+ * - CaptureMixerID
|
||||
+ * - mixer capture ID
|
||||
+ * - JackDev
|
||||
+ * - jack device name
|
||||
+ * - JackControl
|
||||
+ * - jack control name
|
||||
+ * - JackHWMute
|
||||
+ * - indicate if the HW mutes a device on jack insertion or not.
|
||||
*/
|
||||
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
||||
const char *identifier,
|
||||
--
|
||||
2.4.1
|
||||
|
49
0005-ucm-improve-jack-configuration-documentation.patch
Normal file
49
0005-ucm-improve-jack-configuration-documentation.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From ecb38d2bec72a9fbb171e2e89816301d3451c8d3 Mon Sep 17 00:00:00 2001
|
||||
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
|
||||
Date: Thu, 5 Mar 2015 14:51:58 +0200
|
||||
Subject: [PATCH 05/16] ucm: improve jack configuration documentation
|
||||
|
||||
Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
include/use-case.h | 24 ++++++++++++++++++------
|
||||
1 file changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/use-case.h b/include/use-case.h
|
||||
index d30952245fde..e3308b17b105 100644
|
||||
--- a/include/use-case.h
|
||||
+++ b/include/use-case.h
|
||||
@@ -301,12 +301,24 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
|
||||
* - name of capture mixer
|
||||
* - CaptureMixerID
|
||||
* - mixer capture ID
|
||||
- * - JackDev
|
||||
- * - jack device name
|
||||
- * - JackControl
|
||||
- * - jack control name
|
||||
- * - JackHWMute
|
||||
- * - indicate if the HW mutes a device on jack insertion or not.
|
||||
+ * - JackControl, JackDev, JackHWMute
|
||||
+ * - Jack information for a device. The jack status can be reported via
|
||||
+ * a kcontrol and/or via an input device. **JackControl** is the
|
||||
+ * kcontrol name of the jack, and **JackDev** is the input device id of
|
||||
+ * the jack (if the full input device path is /dev/input/by-id/foo, the
|
||||
+ * JackDev value should be "foo"). UCM configuration files should
|
||||
+ * contain both JackControl and JackDev when possible, because
|
||||
+ * applications are likely to support only one or the other.
|
||||
+ *
|
||||
+ * If **JackHWMute** is set, it indicates that when the jack is plugged
|
||||
+ * in, the hardware automatically mutes some other device. The
|
||||
+ * JackHWMute value is the name of the muted device. Note that
|
||||
+ * JackHWMute should be used only when the hardware enforces the
|
||||
+ * automatic muting. If the hardware doesn't enforce any muting, it may
|
||||
+ * still be tempting to set JackHWMute to trick upper software layers to
|
||||
+ * e.g. automatically mute speakers when headphones are plugged in, but
|
||||
+ * that's application policy configuration that doesn't belong to UCM
|
||||
+ * configuration files.
|
||||
*/
|
||||
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
||||
const char *identifier,
|
||||
--
|
||||
2.4.1
|
||||
|
31
0006-USB-audio-Sound-Blaster-HD-iec958-is-on-device-1.patch
Normal file
31
0006-USB-audio-Sound-Blaster-HD-iec958-is-on-device-1.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From c39d0834d5ad5ca3f2882457f2d4a14e678bfe76 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Richard=20K=C3=B6rber?= <dev@shredzone.de>
|
||||
Date: Wed, 21 Jan 2015 22:50:27 +0100
|
||||
Subject: [PATCH 06/16] USB-audio: Sound Blaster HD iec958 is on device 1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Creative Sound Blaster X-Fi HD uses device 1 for iec958 output.
|
||||
|
||||
Signed-off-by: Richard Körber <dev@shredzone.de>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/cards/USB-Audio.conf | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
|
||||
index 4cbf85e7a17b..031bee0d86fd 100644
|
||||
--- a/src/conf/cards/USB-Audio.conf
|
||||
+++ b/src/conf/cards/USB-Audio.conf
|
||||
@@ -37,6 +37,7 @@ USB-Audio.pcm.surround40_type {
|
||||
# number for the iec958 device can be changed here.
|
||||
USB-Audio.pcm.iec958_device {
|
||||
# "NoiseBlaster 3000" 42
|
||||
+ "USB Sound Blaster HD" 1
|
||||
|
||||
# The below don't have digital in/out, so prevent them from being opened.
|
||||
"Andrea PureAudio USB-SA Headset" 999
|
||||
--
|
||||
2.4.1
|
||||
|
112
0007-Sync-include-sound-asound.h-with-4.1-kernel.patch
Normal file
112
0007-Sync-include-sound-asound.h-with-4.1-kernel.patch
Normal file
@ -0,0 +1,112 @@
|
||||
From b07de7c26b147a19621e35b33fa772de575fa2b8 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 21 Apr 2015 12:49:29 +0200
|
||||
Subject: [PATCH 07/16] Sync include/sound/asound.h with 4.1 kernel
|
||||
|
||||
This adds the new ABI for timestamp stuff and minor fixes.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
include/sound/asound.h | 42 ++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 36 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/sound/asound.h b/include/sound/asound.h
|
||||
index 1f23cd635957..a45be6bdcf5b 100644
|
||||
--- a/include/sound/asound.h
|
||||
+++ b/include/sound/asound.h
|
||||
@@ -25,6 +25,9 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
+#ifndef __KERNEL__
|
||||
+#include <stdlib.h>
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* protocol version
|
||||
@@ -140,7 +143,7 @@ struct snd_hwdep_dsp_image {
|
||||
* *
|
||||
*****************************************************************************/
|
||||
|
||||
-#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 12)
|
||||
+#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 13)
|
||||
|
||||
typedef unsigned long snd_pcm_uframes_t;
|
||||
typedef signed long snd_pcm_sframes_t;
|
||||
@@ -267,9 +270,17 @@ typedef int __bitwise snd_pcm_subformat_t;
|
||||
#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */
|
||||
#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */
|
||||
#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */
|
||||
-#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* has audio wall clock for audio/system time sync */
|
||||
+#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* (Deprecated)has audio wall clock for audio/system time sync */
|
||||
+#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */
|
||||
+#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000 /* report absolute hardware link audio time, not reset on startup */
|
||||
+#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */
|
||||
+#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */
|
||||
+
|
||||
+#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */
|
||||
#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */
|
||||
|
||||
+
|
||||
+
|
||||
typedef int __bitwise snd_pcm_state_t;
|
||||
#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) /* stream is open */
|
||||
#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) /* stream has a setup */
|
||||
@@ -407,6 +418,22 @@ struct snd_pcm_channel_info {
|
||||
unsigned int step; /* samples distance in bits */
|
||||
};
|
||||
|
||||
+enum {
|
||||
+ /*
|
||||
+ * first definition for backwards compatibility only,
|
||||
+ * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else
|
||||
+ */
|
||||
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
|
||||
+
|
||||
+ /* timestamp definitions */
|
||||
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */
|
||||
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock counter, reset on startup */
|
||||
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock counter, not reset on startup */
|
||||
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */
|
||||
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */
|
||||
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
|
||||
+};
|
||||
+
|
||||
struct snd_pcm_status {
|
||||
snd_pcm_state_t state; /* stream state */
|
||||
struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
|
||||
@@ -418,9 +445,11 @@ struct snd_pcm_status {
|
||||
snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */
|
||||
snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */
|
||||
snd_pcm_state_t suspended_state; /* suspended stream state */
|
||||
- __u32 reserved_alignment; /* must be filled with zero */
|
||||
- struct timespec audio_tstamp; /* from sample counter or wall clock */
|
||||
- unsigned char reserved[56-sizeof(struct timespec)]; /* must be filled with zero */
|
||||
+ __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspace */
|
||||
+ struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */
|
||||
+ struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */
|
||||
+ __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */
|
||||
+ unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */
|
||||
};
|
||||
|
||||
struct snd_pcm_mmap_status {
|
||||
@@ -533,6 +562,7 @@ enum {
|
||||
#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
|
||||
#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
|
||||
#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
|
||||
+#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
|
||||
#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
|
||||
#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
|
||||
#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
|
||||
@@ -834,7 +864,7 @@ struct snd_ctl_elem_id {
|
||||
snd_ctl_elem_iface_t iface; /* interface identifier */
|
||||
unsigned int device; /* device/client number */
|
||||
unsigned int subdevice; /* subdevice (substream) number */
|
||||
- unsigned char name[44]; /* ASCII name of item */
|
||||
+ unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* ASCII name of item */
|
||||
unsigned int index; /* index of item */
|
||||
};
|
||||
|
||||
--
|
||||
2.4.1
|
||||
|
@ -0,0 +1,32 @@
|
||||
From ba6fa7b5a6a34da98e05df395f70bba3e2993497 Mon Sep 17 00:00:00 2001
|
||||
From: Jie Yang <yang.jie@intel.com>
|
||||
Date: Tue, 28 Apr 2015 15:40:22 +0800
|
||||
Subject: [PATCH 08/16] conf/ucm: broadwell-rt286: change to use the correct
|
||||
jack kcontrol name
|
||||
|
||||
The headset jack has two kctls: "Headphone Jack" and "Mic Jack",
|
||||
we need switch speaker output according to the former JackControl.
|
||||
Here correct it.
|
||||
|
||||
Signed-off-by: Jie Yang <yang.jie@intel.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/ucm/broadwell-rt286/HiFi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/ucm/broadwell-rt286/HiFi b/src/conf/ucm/broadwell-rt286/HiFi
|
||||
index 08f5c50db405..58983ea5763c 100644
|
||||
--- a/src/conf/ucm/broadwell-rt286/HiFi
|
||||
+++ b/src/conf/ucm/broadwell-rt286/HiFi
|
||||
@@ -43,7 +43,7 @@ SectionDevice."Headphones" {
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
JackDev "rt286-jack"
|
||||
- JackControl "Headset Jack"
|
||||
+ JackControl "Headphone Jack"
|
||||
JackHWMute "Speaker"
|
||||
}
|
||||
}
|
||||
--
|
||||
2.4.1
|
||||
|
@ -0,0 +1,67 @@
|
||||
From bf98b4e3166c28343429119135644ba70c6e5277 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 30 Apr 2015 12:26:43 +0200
|
||||
Subject: [PATCH 09/16] namehint: Fix invalid list access in
|
||||
snd_device_name_hint()
|
||||
|
||||
snd_device_name_hint() tries to free the allocated list at the error
|
||||
path via snd_device_name_free_hint(). But snd_device_name_free_hint()
|
||||
expects a list terminated by NULL while snd_device_name_hint() doesn't
|
||||
add it. Adding it may again result in an error and thus isn't
|
||||
guaranteed to work. Hence we can't add NULL at the error path.
|
||||
|
||||
Instead, now the code always allocates one entry more, and zero-clears
|
||||
the newly allocated beforehand to guarantee the NULL termination.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/control/namehint.c | 21 ++++++++++-----------
|
||||
1 file changed, 10 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/control/namehint.c b/src/control/namehint.c
|
||||
index 28975a400b75..66de634d3550 100644
|
||||
--- a/src/control/namehint.c
|
||||
+++ b/src/control/namehint.c
|
||||
@@ -52,10 +52,11 @@ static int hint_list_add(struct hint_list *list,
|
||||
{
|
||||
char *x;
|
||||
|
||||
- if (list->count == list->allocated) {
|
||||
+ if (list->count + 1 >= list->allocated) {
|
||||
char **n = realloc(list->list, (list->allocated + 10) * sizeof(char *));
|
||||
if (n == NULL)
|
||||
return -ENOMEM;
|
||||
+ memset(n + list->allocated, 0, 10 * sizeof(*n));
|
||||
list->allocated += 10;
|
||||
list->list = n;
|
||||
}
|
||||
@@ -620,18 +621,16 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
|
||||
}
|
||||
err = 0;
|
||||
__error:
|
||||
- if (err < 0) {
|
||||
+ /* add an empty entry if nothing has been added yet; the caller
|
||||
+ * expects non-NULL return
|
||||
+ */
|
||||
+ if (!err && !list.list)
|
||||
+ err = hint_list_add(&list, NULL, NULL);
|
||||
+ if (err < 0)
|
||||
snd_device_name_free_hint((void **)list.list);
|
||||
- if (list.cardname)
|
||||
- free(list.cardname);
|
||||
- } else {
|
||||
- err = hint_list_add(&list, NULL, NULL);
|
||||
- if (err < 0)
|
||||
- goto __error;
|
||||
+ else
|
||||
*hints = (void **)list.list;
|
||||
- if (list.cardname)
|
||||
- free(list.cardname);
|
||||
- }
|
||||
+ free(list.cardname);
|
||||
if (local_config_rw)
|
||||
snd_config_delete(local_config_rw);
|
||||
if (local_config)
|
||||
--
|
||||
2.4.1
|
||||
|
33
0010-namehint-Fix-the-listing-without-device-number.patch
Normal file
33
0010-namehint-Fix-the-listing-without-device-number.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From c8667e3db4a47b0379562341317f3e868a7b2d51 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 30 Apr 2015 14:32:49 +0200
|
||||
Subject: [PATCH 10/16] namehint: Fix the listing without device number
|
||||
|
||||
The current code of snd_device_name_hint() has a bug when listing up
|
||||
devices without the device index (e.g. ctl). Because it assigns the
|
||||
default device index 0 unconditionally and it has a check at the later
|
||||
point to filter entries with dev >= 0, it ended up with empty
|
||||
outputs.
|
||||
|
||||
The fix is simply to remove the bogus assignment of dev = 0.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/control/namehint.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/control/namehint.c b/src/control/namehint.c
|
||||
index 66de634d3550..6c04143a185c 100644
|
||||
--- a/src/control/namehint.c
|
||||
+++ b/src/control/namehint.c
|
||||
@@ -272,7 +272,6 @@ static int try_config(snd_config_t *config,
|
||||
if (snd_config_search(cfg1, "type", &cfg) >= 0 &&
|
||||
snd_config_get_string(cfg, &str) >= 0 &&
|
||||
strcmp(str, "hw") == 0) {
|
||||
- dev = 0;
|
||||
list->device_input = -1;
|
||||
list->device_output = -1;
|
||||
if (snd_config_search(cfg1, "device", &cfg) >= 0) {
|
||||
--
|
||||
2.4.1
|
||||
|
39
0011-namehint-Fix-bad-free-with-invalid-iface-name.patch
Normal file
39
0011-namehint-Fix-bad-free-with-invalid-iface-name.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 46d98392d0f832e46693c8c06b4927a5eb6f4b28 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 30 Apr 2015 14:38:25 +0200
|
||||
Subject: [PATCH 11/16] namehint: Fix bad free with invalid iface name
|
||||
|
||||
Due to the uninitialized field before the error path, passing an
|
||||
invalid iface argument may result in a bad free() call. Initialize
|
||||
the fields properly beforehand.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/control/namehint.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/control/namehint.c b/src/control/namehint.c
|
||||
index 6c04143a185c..b3e646eb10af 100644
|
||||
--- a/src/control/namehint.c
|
||||
+++ b/src/control/namehint.c
|
||||
@@ -562,6 +562,8 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
|
||||
list.list = NULL;
|
||||
list.count = list.allocated = 0;
|
||||
list.siface = iface;
|
||||
+ list.show_all = 0;
|
||||
+ list.cardname = NULL;
|
||||
if (strcmp(iface, "card") == 0)
|
||||
list.iface = SND_CTL_ELEM_IFACE_CARD;
|
||||
else if (strcmp(iface, "pcm") == 0)
|
||||
@@ -581,8 +583,6 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
|
||||
goto __error;
|
||||
}
|
||||
|
||||
- list.show_all = 0;
|
||||
- list.cardname = NULL;
|
||||
if (snd_config_search(local_config, "defaults.namehint.showall", &conf) >= 0)
|
||||
list.show_all = snd_config_get_bool(conf) > 0;
|
||||
if (card >= 0) {
|
||||
--
|
||||
2.4.1
|
||||
|
245
0012-Allow-hint-for-ctl-hwdep-timer-and-seq.patch
Normal file
245
0012-Allow-hint-for-ctl-hwdep-timer-and-seq.patch
Normal file
@ -0,0 +1,245 @@
|
||||
From 7d9972c6ad154bc55ccecb555ec84c01a694a050 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 30 Apr 2015 14:52:35 +0200
|
||||
Subject: [PATCH 12/16] Allow hint for ctl, hwdep, timer and seq
|
||||
|
||||
Like pcm and rawmidi, each object parser needs to accept the hint
|
||||
component. Now a new local function _snd_conf_generic_id() was
|
||||
introduced to replace each call of "comment" and "type" field checks.
|
||||
|
||||
Also, the two existing identical functions for pcm and rawmidi are
|
||||
removed and the new function is used commonly.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
include/local.h | 2 ++
|
||||
src/confmisc.c | 13 +++++++++++++
|
||||
src/control/control_hw.c | 4 +---
|
||||
src/control/control_shm.c | 7 ++-----
|
||||
src/hwdep/hwdep_hw.c | 4 +---
|
||||
src/pcm/pcm.c | 12 ------------
|
||||
src/pcm/pcm_local.h | 5 ++---
|
||||
src/rawmidi/rawmidi.c | 18 ------------------
|
||||
src/rawmidi/rawmidi_local.h | 2 +-
|
||||
src/seq/seq_hw.c | 4 +---
|
||||
src/timer/timer_hw.c | 4 +---
|
||||
src/timer/timer_query_hw.c | 4 +---
|
||||
12 files changed, 25 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/include/local.h b/include/local.h
|
||||
index 2fe9a273f0b0..660081638a1c 100644
|
||||
--- a/include/local.h
|
||||
+++ b/include/local.h
|
||||
@@ -348,4 +348,6 @@ int snd_config_search_alias_hooks(snd_config_t *config,
|
||||
const char *base, const char *key,
|
||||
snd_config_t **result);
|
||||
|
||||
+int _snd_conf_generic_id(const char *id);
|
||||
+
|
||||
#endif
|
||||
diff --git a/src/confmisc.c b/src/confmisc.c
|
||||
index af686bea323c..1fb4f282217e 100644
|
||||
--- a/src/confmisc.c
|
||||
+++ b/src/confmisc.c
|
||||
@@ -1302,3 +1302,16 @@ int snd_func_refer(snd_config_t **dst, snd_config_t *root, snd_config_t *src,
|
||||
#ifndef DOC_HIDDEN
|
||||
SND_DLSYM_BUILD_VERSION(snd_func_refer, SND_CONFIG_DLSYM_VERSION_EVALUATE);
|
||||
#endif
|
||||
+
|
||||
+#ifndef DOC_HIDDEN
|
||||
+int _snd_conf_generic_id(const char *id)
|
||||
+{
|
||||
+ static const char ids[3][8] = { "comment", "type", "hint" };
|
||||
+ unsigned int k;
|
||||
+ for (k = 0; k < sizeof(ids) / sizeof(ids[0]); ++k) {
|
||||
+ if (strcmp(id, ids[k]) == 0)
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/src/control/control_hw.c b/src/control/control_hw.c
|
||||
index dfc9dcd51e20..7d23151c7d75 100644
|
||||
--- a/src/control/control_hw.c
|
||||
+++ b/src/control/control_hw.c
|
||||
@@ -446,9 +446,7 @@ int _snd_ctl_hw_open(snd_ctl_t **handlep, char *name, snd_config_t *root ATTRIBU
|
||||
const char *id;
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
- if (strcmp(id, "comment") == 0)
|
||||
- continue;
|
||||
- if (strcmp(id, "type") == 0)
|
||||
+ if (_snd_conf_generic_id(id))
|
||||
continue;
|
||||
if (strcmp(id, "card") == 0) {
|
||||
err = snd_config_get_integer(n, &card);
|
||||
diff --git a/src/control/control_shm.c b/src/control/control_shm.c
|
||||
index 40bc705d8036..bd07d4af503a 100644
|
||||
--- a/src/control/control_shm.c
|
||||
+++ b/src/control/control_shm.c
|
||||
@@ -551,10 +551,7 @@ int _snd_ctl_shm_open(snd_ctl_t **handlep, char *name, snd_config_t *root, snd_c
|
||||
const char *id;
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
- if (strcmp(id, "comment") == 0)
|
||||
- continue;
|
||||
- if (strcmp(id, "type") == 0)
|
||||
- continue;
|
||||
+ if (_snd_conf_generic_id(id))
|
||||
if (strcmp(id, "server") == 0) {
|
||||
err = snd_config_get_string(n, &server);
|
||||
if (err < 0) {
|
||||
@@ -597,7 +594,7 @@ int _snd_ctl_shm_open(snd_ctl_t **handlep, char *name, snd_config_t *root, snd_c
|
||||
const char *id;
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
- if (strcmp(id, "comment") == 0)
|
||||
+ if (_snd_conf_generic_id(id))
|
||||
continue;
|
||||
if (strcmp(id, "host") == 0)
|
||||
continue;
|
||||
diff --git a/src/hwdep/hwdep_hw.c b/src/hwdep/hwdep_hw.c
|
||||
index 4314e32bade6..12528c55bac7 100644
|
||||
--- a/src/hwdep/hwdep_hw.c
|
||||
+++ b/src/hwdep/hwdep_hw.c
|
||||
@@ -158,9 +158,7 @@ int _snd_hwdep_hw_open(snd_hwdep_t **hwdep, char *name,
|
||||
const char *id;
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
- if (strcmp(id, "comment") == 0)
|
||||
- continue;
|
||||
- if (strcmp(id, "type") == 0)
|
||||
+ if (_snd_conf_generic_id(id))
|
||||
continue;
|
||||
if (strcmp(id, "card") == 0) {
|
||||
err = snd_config_get_integer(n, &card);
|
||||
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
|
||||
index e74e02fc568f..bc18954b92da 100644
|
||||
--- a/src/pcm/pcm.c
|
||||
+++ b/src/pcm/pcm.c
|
||||
@@ -7059,18 +7059,6 @@ int snd_pcm_slave_conf(snd_config_t *root, snd_config_t *conf,
|
||||
return err;
|
||||
}
|
||||
|
||||
-
|
||||
-int snd_pcm_conf_generic_id(const char *id)
|
||||
-{
|
||||
- static const char ids[3][8] = { "comment", "type", "hint" };
|
||||
- unsigned int k;
|
||||
- for (k = 0; k < sizeof(ids) / sizeof(ids[0]); ++k) {
|
||||
- if (strcmp(id, ids[k]) == 0)
|
||||
- return 1;
|
||||
- }
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static void snd_pcm_set_ptr(snd_pcm_t *pcm, snd_pcm_rbptr_t *rbptr,
|
||||
volatile snd_pcm_uframes_t *hw_ptr, int fd, off_t offset)
|
||||
{
|
||||
diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
|
||||
index 394505f978ac..326618ecd0c0 100644
|
||||
--- a/src/pcm/pcm_local.h
|
||||
+++ b/src/pcm/pcm_local.h
|
||||
@@ -262,8 +262,6 @@ struct _snd_pcm {
|
||||
snd1_pcm_areas_from_bufs
|
||||
#define snd_pcm_open_named_slave \
|
||||
snd1_pcm_open_named_slave
|
||||
-#define snd_pcm_conf_generic_id \
|
||||
- snd1_pcm_conf_generic_id
|
||||
#define snd_pcm_hw_open_fd \
|
||||
snd1_pcm_hw_open_fd
|
||||
#define snd_pcm_wait_nocheck \
|
||||
@@ -882,7 +880,8 @@ snd_pcm_open_slave(snd_pcm_t **pcmp, snd_config_t *root,
|
||||
return snd_pcm_open_named_slave(pcmp, NULL, root, conf, stream,
|
||||
mode, parent_conf);
|
||||
}
|
||||
-int snd_pcm_conf_generic_id(const char *id);
|
||||
+
|
||||
+#define snd_pcm_conf_generic_id(id) _snd_conf_generic_id(id)
|
||||
|
||||
int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd, int mmap_emulation, int sync_ptr_ioctl);
|
||||
int __snd_pcm_mmap_emul_open(snd_pcm_t **pcmp, const char *name,
|
||||
diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c
|
||||
index ac699b439b11..0c89b8b984b9 100644
|
||||
--- a/src/rawmidi/rawmidi.c
|
||||
+++ b/src/rawmidi/rawmidi.c
|
||||
@@ -990,21 +990,3 @@ ssize_t snd_rawmidi_read(snd_rawmidi_t *rawmidi, void *buffer, size_t size)
|
||||
assert(buffer || size == 0);
|
||||
return (rawmidi->ops->read)(rawmidi, buffer, size);
|
||||
}
|
||||
-
|
||||
-#ifndef DOC_HIDDEN
|
||||
-int snd_rawmidi_conf_generic_id(const char *id)
|
||||
-{
|
||||
- static const char ids[][8] = {
|
||||
- "comment",
|
||||
- "type",
|
||||
- "hint",
|
||||
- };
|
||||
- unsigned int k;
|
||||
-
|
||||
- for (k = 0; k < sizeof ids / sizeof *ids; ++k) {
|
||||
- if (strcmp(id, ids[k]) == 0)
|
||||
- return 1;
|
||||
- }
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
diff --git a/src/rawmidi/rawmidi_local.h b/src/rawmidi/rawmidi_local.h
|
||||
index 3388502cece0..8992771eb5d3 100644
|
||||
--- a/src/rawmidi/rawmidi_local.h
|
||||
+++ b/src/rawmidi/rawmidi_local.h
|
||||
@@ -58,4 +58,4 @@ int snd_rawmidi_virtual_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
||||
const char *name, snd_seq_t *seq_handle, int port,
|
||||
int merge, int mode);
|
||||
|
||||
-int snd_rawmidi_conf_generic_id(const char *id);
|
||||
+#define snd_rawmidi_conf_generic_id(id) _snd_conf_generic_id(id)
|
||||
diff --git a/src/seq/seq_hw.c b/src/seq/seq_hw.c
|
||||
index 6cb31d6f4c25..d03336738944 100644
|
||||
--- a/src/seq/seq_hw.c
|
||||
+++ b/src/seq/seq_hw.c
|
||||
@@ -546,9 +546,7 @@ int _snd_seq_hw_open(snd_seq_t **handlep, char *name,
|
||||
const char *id;
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
- if (strcmp(id, "comment") == 0)
|
||||
- continue;
|
||||
- if (strcmp(id, "type") == 0)
|
||||
+ if (_snd_conf_generic_id(id))
|
||||
continue;
|
||||
return -EINVAL;
|
||||
}
|
||||
diff --git a/src/timer/timer_hw.c b/src/timer/timer_hw.c
|
||||
index aa6a0b1b42f1..e833fc8cbb41 100644
|
||||
--- a/src/timer/timer_hw.c
|
||||
+++ b/src/timer/timer_hw.c
|
||||
@@ -299,9 +299,7 @@ int _snd_timer_hw_open(snd_timer_t **timer, char *name,
|
||||
const char *id;
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
- if (strcmp(id, "comment") == 0)
|
||||
- continue;
|
||||
- if (strcmp(id, "type") == 0)
|
||||
+ if (_snd_conf_generic_id(id))
|
||||
continue;
|
||||
if (strcmp(id, "class") == 0) {
|
||||
err = snd_config_get_integer(n, &dev_class);
|
||||
diff --git a/src/timer/timer_query_hw.c b/src/timer/timer_query_hw.c
|
||||
index 9f62b78aeb2e..289ca52f2afa 100644
|
||||
--- a/src/timer/timer_query_hw.c
|
||||
+++ b/src/timer/timer_query_hw.c
|
||||
@@ -134,9 +134,7 @@ int _snd_timer_query_hw_open(snd_timer_query_t **timer, char *name,
|
||||
const char *id;
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
- if (strcmp(id, "comment") == 0)
|
||||
- continue;
|
||||
- if (strcmp(id, "type") == 0)
|
||||
+ if (_snd_conf_generic_id(id))
|
||||
continue;
|
||||
SNDERR("Unexpected field %s", id);
|
||||
return -EINVAL;
|
||||
--
|
||||
2.4.1
|
||||
|
@ -0,0 +1,87 @@
|
||||
From 434f2f021f00045abcf79c9048b808c5dccfc930 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 30 Apr 2015 15:02:04 +0200
|
||||
Subject: [PATCH 13/16] conf: Add hint descriptions to ctl, hwdep, seq and
|
||||
timer devices
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/alsa.conf | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
|
||||
index 5c928e8afbcd..f22918fbbf83 100644
|
||||
--- a/src/conf/alsa.conf
|
||||
+++ b/src/conf/alsa.conf
|
||||
@@ -345,6 +345,7 @@ ctl.sysdefault {
|
||||
name defaults.ctl.card
|
||||
}
|
||||
}
|
||||
+ hint.description "Default control device"
|
||||
}
|
||||
ctl.default ctl.sysdefault
|
||||
|
||||
@@ -366,6 +367,7 @@ ctl.hw {
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
+ hint.description "Direct control device"
|
||||
}
|
||||
|
||||
ctl.shm {
|
||||
@@ -408,6 +410,7 @@ rawmidi.default {
|
||||
name defaults.rawmidi.device
|
||||
}
|
||||
}
|
||||
+ hint.description "Default raw MIDI device"
|
||||
}
|
||||
|
||||
rawmidi.hw {
|
||||
@@ -469,6 +472,7 @@ rawmidi.virtual {
|
||||
|
||||
seq.default {
|
||||
type hw
|
||||
+ hint.description "Default sequencer device"
|
||||
}
|
||||
|
||||
seq.hw {
|
||||
@@ -502,6 +506,7 @@ hwdep.default {
|
||||
name defaults.hwdep.device
|
||||
}
|
||||
}
|
||||
+ hint.description "Default hardware dependent device"
|
||||
}
|
||||
|
||||
hwdep.hw {
|
||||
@@ -536,6 +541,10 @@ hwdep.hw {
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
+ hint {
|
||||
+ description "Direct hardware dependent device"
|
||||
+ device $DEV
|
||||
+ }
|
||||
}
|
||||
|
||||
#
|
||||
@@ -572,7 +581,7 @@ timer.default {
|
||||
@func refer
|
||||
name defaults.timer.subdevice
|
||||
}
|
||||
- hint.description "Default direct hardware timer device"
|
||||
+ hint.description "Default timer device"
|
||||
}
|
||||
|
||||
timer.hw {
|
||||
@@ -618,4 +627,8 @@ timer.hw {
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
+ hint {
|
||||
+ description "Direct timer device"
|
||||
+ device $DEV
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.4.1
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 404951da5ed66c80caf5e3fa3d703f291002cb24 Mon Sep 17 00:00:00 2001
|
||||
From: Jie Yang <yang.jie@intel.com>
|
||||
Date: Fri, 8 May 2015 15:18:47 +0800
|
||||
Subject: [PATCH 14/16] conf/ucm: broadwell-rt286: change to set capture volume
|
||||
and capture device
|
||||
|
||||
Set 'Mic Capture Volume' in capture device EnableSequence, to fix
|
||||
capture no volume by default issue.
|
||||
|
||||
Also add JackHWMute Value item to mute onboard dmic while headset
|
||||
mic is plugged in.
|
||||
|
||||
Signed-off-by: Jie Yang <yang.jie@intel.com>
|
||||
Tested-by: Mark Brown <broonie@kernel.org>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/ucm/broadwell-rt286/HiFi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/conf/ucm/broadwell-rt286/HiFi b/src/conf/ucm/broadwell-rt286/HiFi
|
||||
index 58983ea5763c..c09a01cca8fd 100644
|
||||
--- a/src/conf/ucm/broadwell-rt286/HiFi
|
||||
+++ b/src/conf/ucm/broadwell-rt286/HiFi
|
||||
@@ -86,6 +86,7 @@ SectionDevice."Handset" {
|
||||
EnableSequence [
|
||||
cdev "hw:broadwellrt286"
|
||||
|
||||
+ cset "name='Mic Capture Volume' 28"
|
||||
cset "name='ADC 0 Mux' 0"
|
||||
cset "name='ADC0 Capture Switch' on"
|
||||
cset "name='ADC0 Capture Volume' 127"
|
||||
@@ -99,6 +100,9 @@ SectionDevice."Handset" {
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
+ JackDev "rt286-jack"
|
||||
+ JackControl "Mic Jack"
|
||||
+ JackHWMute "Mainmic"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +116,7 @@ SectionDevice."Mainmic" {
|
||||
EnableSequence [
|
||||
cdev "hw:broadwellrt286"
|
||||
|
||||
+ cset "name='Mic Capture Volume' 30"
|
||||
cset "name='ADC 0 Mux' 2"
|
||||
cset "name='ADC0 Capture Switch' on"
|
||||
cset "name='ADC0 Capture Volume' 127"
|
||||
--
|
||||
2.4.1
|
||||
|
47
0015-ucm-allow-multiple-devices-in-JackHWMute.patch
Normal file
47
0015-ucm-allow-multiple-devices-in-JackHWMute.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From b4222f3fdc13f18fa621d6c6ff2fa6ed52e25de3 Mon Sep 17 00:00:00 2001
|
||||
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
|
||||
Date: Mon, 4 May 2015 19:10:38 +0300
|
||||
Subject: [PATCH 15/16] ucm: allow multiple devices in JackHWMute
|
||||
|
||||
One jack may mute multiple devices, so let's make JackHWMute a list of
|
||||
device names instead of just a single device name.
|
||||
|
||||
Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
|
||||
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
|
||||
Acked-by: Mark Brown <broonie@kernel.org>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
include/use-case.h | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/use-case.h b/include/use-case.h
|
||||
index e3308b17b105..c7789c03c4e8 100644
|
||||
--- a/include/use-case.h
|
||||
+++ b/include/use-case.h
|
||||
@@ -311,14 +311,15 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
|
||||
* applications are likely to support only one or the other.
|
||||
*
|
||||
* If **JackHWMute** is set, it indicates that when the jack is plugged
|
||||
- * in, the hardware automatically mutes some other device. The
|
||||
- * JackHWMute value is the name of the muted device. Note that
|
||||
- * JackHWMute should be used only when the hardware enforces the
|
||||
- * automatic muting. If the hardware doesn't enforce any muting, it may
|
||||
- * still be tempting to set JackHWMute to trick upper software layers to
|
||||
- * e.g. automatically mute speakers when headphones are plugged in, but
|
||||
- * that's application policy configuration that doesn't belong to UCM
|
||||
- * configuration files.
|
||||
+ * in, the hardware automatically mutes some other device(s). The
|
||||
+ * JackHWMute value is a space-separated list of device names (this
|
||||
+ * isn't compatible with device names with spaces in them, so don't use
|
||||
+ * such device names!). Note that JackHWMute should be used only when
|
||||
+ * the hardware enforces the automatic muting. If the hardware doesn't
|
||||
+ * enforce any muting, it may still be tempting to set JackHWMute to
|
||||
+ * trick upper software layers to e.g. automatically mute speakers when
|
||||
+ * headphones are plugged in, but that's application policy
|
||||
+ * configuration that doesn't belong to UCM configuration files.
|
||||
*/
|
||||
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
||||
const char *identifier,
|
||||
--
|
||||
2.4.1
|
||||
|
36
0016-pcm-Remove-assert-from-snd_pcm_hw_params_slave.patch
Normal file
36
0016-pcm-Remove-assert-from-snd_pcm_hw_params_slave.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 67f73b0fab466e780dcc0442e19894a1cbedc43b Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 21 May 2015 07:26:39 +0200
|
||||
Subject: [PATCH 16/16] pcm: Remove assert() from snd_pcm_hw_params_slave()
|
||||
|
||||
Using assert() for non-fatal error checks is really brain-dead.
|
||||
These are especially bad, as it hits even in the normal operation with
|
||||
plugins and some h/w constraints.
|
||||
|
||||
Reported-by: Alan Horstmann <gineera@aspect135.co.uk>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_params.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_params.c b/src/pcm/pcm_params.c
|
||||
index 6e57904e445b..1d667a583151 100644
|
||||
--- a/src/pcm/pcm_params.c
|
||||
+++ b/src/pcm/pcm_params.c
|
||||
@@ -2244,9 +2244,11 @@ int snd_pcm_hw_params_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
|
||||
snd_pcm_hw_params_t slave_params;
|
||||
int err;
|
||||
err = sprepare(pcm, &slave_params);
|
||||
- assert(err >= 0);
|
||||
+ if (err < 0)
|
||||
+ return err;
|
||||
err = schange(pcm, params, &slave_params);
|
||||
- assert(err >= 0);
|
||||
+ if (err < 0)
|
||||
+ return err;
|
||||
err = sparams(pcm, &slave_params);
|
||||
if (err < 0)
|
||||
cchange(pcm, params, &slave_params);
|
||||
--
|
||||
2.4.1
|
||||
|
22
alsa.changes
22
alsa.changes
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 22 14:16:26 CEST 2015 - tiwai@suse.de
|
||||
|
||||
- Backport upstream fixes: UCM updates, Broadwell UCM support,
|
||||
namehint fixes, fix faulty assert in PCM plugins, etc:
|
||||
0001-ucm-document-some-standard-values.patch
|
||||
0002-conf-ucm-broadwell-rt286-add-ucm-config.patch
|
||||
0003-conf-ucm-Add-Makefile.am-for-broadwell-rt286-ucm-con.patch
|
||||
0004-ucm-reformat-snd_use_case_get-doc.patch
|
||||
0005-ucm-improve-jack-configuration-documentation.patch
|
||||
0006-USB-audio-Sound-Blaster-HD-iec958-is-on-device-1.patch
|
||||
0007-Sync-include-sound-asound.h-with-4.1-kernel.patch
|
||||
0008-conf-ucm-broadwell-rt286-change-to-use-the-correct-j.patch
|
||||
0009-namehint-Fix-invalid-list-access-in-snd_device_name_.patch
|
||||
0010-namehint-Fix-the-listing-without-device-number.patch
|
||||
0011-namehint-Fix-bad-free-with-invalid-iface-name.patch
|
||||
0012-Allow-hint-for-ctl-hwdep-timer-and-seq.patch
|
||||
0013-conf-Add-hint-descriptions-to-ctl-hwdep-seq-and-time.patch
|
||||
0014-conf-ucm-broadwell-rt286-change-to-set-capture-volum.patch
|
||||
0015-ucm-allow-multiple-devices-in-JackHWMute.patch
|
||||
0016-pcm-Remove-assert-from-snd_pcm_hw_params_slave.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 26 17:24:22 CET 2015 - tiwai@suse.de
|
||||
|
||||
|
32
alsa.spec
32
alsa.spec
@ -49,6 +49,22 @@ Source40: 50-alsa.conf
|
||||
Source41: install-snd-module
|
||||
# Patch: alsa-lib-git-fixes.diff
|
||||
# upstream fixes
|
||||
Patch1: 0001-ucm-document-some-standard-values.patch
|
||||
Patch2: 0002-conf-ucm-broadwell-rt286-add-ucm-config.patch
|
||||
Patch3: 0003-conf-ucm-Add-Makefile.am-for-broadwell-rt286-ucm-con.patch
|
||||
Patch4: 0004-ucm-reformat-snd_use_case_get-doc.patch
|
||||
Patch5: 0005-ucm-improve-jack-configuration-documentation.patch
|
||||
Patch6: 0006-USB-audio-Sound-Blaster-HD-iec958-is-on-device-1.patch
|
||||
Patch7: 0007-Sync-include-sound-asound.h-with-4.1-kernel.patch
|
||||
Patch8: 0008-conf-ucm-broadwell-rt286-change-to-use-the-correct-j.patch
|
||||
Patch9: 0009-namehint-Fix-invalid-list-access-in-snd_device_name_.patch
|
||||
Patch10: 0010-namehint-Fix-the-listing-without-device-number.patch
|
||||
Patch11: 0011-namehint-Fix-bad-free-with-invalid-iface-name.patch
|
||||
Patch12: 0012-Allow-hint-for-ctl-hwdep-timer-and-seq.patch
|
||||
Patch13: 0013-conf-Add-hint-descriptions-to-ctl-hwdep-seq-and-time.patch
|
||||
Patch14: 0014-conf-ucm-broadwell-rt286-change-to-set-capture-volum.patch
|
||||
Patch15: 0015-ucm-allow-multiple-devices-in-JackHWMute.patch
|
||||
Patch16: 0016-pcm-Remove-assert-from-snd_pcm_hw_params_slave.patch
|
||||
# rest suse patches
|
||||
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
||||
# suppress timestamp in documents
|
||||
@ -119,6 +135,22 @@ Architecture.
|
||||
%prep
|
||||
%setup -q -n alsa-lib-%{package_version}
|
||||
# %patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%if 0%{?suse_version} == 1130
|
||||
%patch99 -p1
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user