|
|
87c116 |
From 9c1439a76cea33d2cec65a42d499230d2f9a5205 Mon Sep 17 00:00:00 2001
|
|
|
87c116 |
From: Takashi Iwai <tiwai@suse.de>
|
|
|
87c116 |
Date: Wed, 9 Jan 2019 12:02:56 +0100
|
|
|
87c116 |
Subject: [PATCH 1/7] pcm: Preserve period_event in snd_pcm_hw_sw_params() call
|
|
|
87c116 |
|
|
|
87c116 |
snd_pcm_hw_sw_params() in pcm_hw.c tries to abuse the reserved bits
|
|
|
87c116 |
for passing period_Event flag. In this hackish way, we clear the
|
|
|
87c116 |
reserved bits at beginning, and restore before returning. However,
|
|
|
87c116 |
the code paths that return earlier don't restore the value, hence when
|
|
|
87c116 |
user calls this function twice, it may pass an unexpected value.
|
|
|
87c116 |
|
|
|
87c116 |
This patch fixes the failure, restoring the value always before
|
|
|
87c116 |
returning from the function.
|
|
|
87c116 |
|
|
|
87c116 |
Reported-by: Jamey Sharp <jamey@minilop.net>
|
|
|
87c116 |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
87c116 |
---
|
|
|
87c116 |
src/pcm/pcm_hw.c | 22 +++++++++++++---------
|
|
|
87c116 |
1 file changed, 13 insertions(+), 9 deletions(-)
|
|
|
87c116 |
|
|
|
87c116 |
diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c
|
|
|
87c116 |
index 59a24200..91370a88 100644
|
|
|
87c116 |
--- a/src/pcm/pcm_hw.c
|
|
|
87c116 |
+++ b/src/pcm/pcm_hw.c
|
|
|
87c116 |
@@ -496,7 +496,7 @@ static int snd_pcm_hw_hw_free(snd_pcm_t *pcm)
|
|
|
87c116 |
static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
|
|
|
87c116 |
{
|
|
|
87c116 |
snd_pcm_hw_t *hw = pcm->private_data;
|
|
|
87c116 |
- int fd = hw->fd, err;
|
|
|
87c116 |
+ int fd = hw->fd, err = 0;
|
|
|
87c116 |
int old_period_event = sw_get_period_event(params);
|
|
|
87c116 |
sw_set_period_event(params, 0);
|
|
|
87c116 |
if ((snd_pcm_tstamp_t) params->tstamp_mode == pcm->tstamp_mode &&
|
|
|
87c116 |
@@ -508,22 +508,25 @@ static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
|
|
|
87c116 |
params->silence_size == pcm->silence_size &&
|
|
|
87c116 |
old_period_event == hw->period_event) {
|
|
|
87c116 |
hw->mmap_control->avail_min = params->avail_min;
|
|
|
87c116 |
- return issue_avail_min(hw);
|
|
|
87c116 |
+ err = issue_avail_min(hw);
|
|
|
87c116 |
+ goto out;
|
|
|
87c116 |
}
|
|
|
87c116 |
if (params->tstamp_type == SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW &&
|
|
|
87c116 |
hw->version < SNDRV_PROTOCOL_VERSION(2, 0, 12)) {
|
|
|
87c116 |
SYSMSG("Kernel doesn't support SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW");
|
|
|
87c116 |
- return -EINVAL;
|
|
|
87c116 |
+ err = -EINVAL;
|
|
|
87c116 |
+ goto out;
|
|
|
87c116 |
}
|
|
|
87c116 |
if (params->tstamp_type == SND_PCM_TSTAMP_TYPE_MONOTONIC &&
|
|
|
87c116 |
hw->version < SNDRV_PROTOCOL_VERSION(2, 0, 5)) {
|
|
|
87c116 |
SYSMSG("Kernel doesn't support SND_PCM_TSTAMP_TYPE_MONOTONIC");
|
|
|
87c116 |
- return -EINVAL;
|
|
|
87c116 |
+ err = -EINVAL;
|
|
|
87c116 |
+ goto out;
|
|
|
87c116 |
}
|
|
|
87c116 |
if (ioctl(fd, SNDRV_PCM_IOCTL_SW_PARAMS, params) < 0) {
|
|
|
87c116 |
err = -errno;
|
|
|
87c116 |
SYSMSG("SNDRV_PCM_IOCTL_SW_PARAMS failed (%i)", err);
|
|
|
87c116 |
- return err;
|
|
|
87c116 |
+ goto out;
|
|
|
87c116 |
}
|
|
|
87c116 |
if ((snd_pcm_tstamp_type_t) params->tstamp_type != pcm->tstamp_type) {
|
|
|
87c116 |
if (hw->version < SNDRV_PROTOCOL_VERSION(2, 0, 12)) {
|
|
|
87c116 |
@@ -532,20 +535,21 @@ static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
|
|
|
87c116 |
if (ioctl(fd, SNDRV_PCM_IOCTL_TSTAMP, &on) < 0) {
|
|
|
87c116 |
err = -errno;
|
|
|
87c116 |
SNDMSG("TSTAMP failed\n");
|
|
|
87c116 |
- return err;
|
|
|
87c116 |
+ goto out;
|
|
|
87c116 |
}
|
|
|
87c116 |
}
|
|
|
87c116 |
pcm->tstamp_type = params->tstamp_type;
|
|
|
87c116 |
}
|
|
|
87c116 |
- sw_set_period_event(params, old_period_event);
|
|
|
87c116 |
hw->mmap_control->avail_min = params->avail_min;
|
|
|
87c116 |
if (hw->period_event != old_period_event) {
|
|
|
87c116 |
err = snd_pcm_hw_change_timer(pcm, old_period_event);
|
|
|
87c116 |
if (err < 0)
|
|
|
87c116 |
- return err;
|
|
|
87c116 |
+ goto out;
|
|
|
87c116 |
hw->period_event = old_period_event;
|
|
|
87c116 |
}
|
|
|
87c116 |
- return 0;
|
|
|
87c116 |
+ out:
|
|
|
87c116 |
+ sw_set_period_event(params, old_period_event);
|
|
|
87c116 |
+ return err;
|
|
|
87c116 |
}
|
|
|
87c116 |
|
|
|
87c116 |
static int snd_pcm_hw_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info)
|
|
|
87c116 |
--
|
|
|
87c116 |
2.20.1
|
|
|
87c116 |
|
|
|
87c116 |
|
|
|
87c116 |
From d8013619c942dd996c32337a9ade429bfaf455ee Mon Sep 17 00:00:00 2001
|
|
|
87c116 |
From: Hui Wang <hui.wang@canonical.com>
|
|
|
87c116 |
Date: Tue, 27 Nov 2018 09:36:28 +0800
|
|
|
87c116 |
Subject: [PATCH 2/7] conf/ucm: Add a UCM profile for Dell WD19 Dock USB-audio
|
|
|
87c116 |
|
|
|
87c116 |
USB-audio device on Dell WD19 docking station provides two individual
|
|
|
87c116 |
output PCM streams, one for headphone Jack and another for speaker out
|
|
|
87c116 |
Jack. A UCM profile gives the proper roles for these.
|
|
|
87c116 |
|
|
|
87c116 |
Signed-off-by: Hui Wang <hui.wang@canonical.com>
|
|
|
87c116 |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
87c116 |
---
|
|
|
87c116 |
.../ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf | 5 ++++
|
|
|
87c116 |
src/conf/ucm/Dell-WD19-Dock/HiFi.conf | 26 +++++++++++++++++++
|
|
|
87c116 |
src/conf/ucm/Dell-WD19-Dock/Makefile.am | 4 +++
|
|
|
87c116 |
3 files changed, 35 insertions(+)
|
|
|
87c116 |
create mode 100644 src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf
|
|
|
87c116 |
create mode 100644 src/conf/ucm/Dell-WD19-Dock/HiFi.conf
|
|
|
87c116 |
create mode 100644 src/conf/ucm/Dell-WD19-Dock/Makefile.am
|
|
|
87c116 |
|
|
|
87c116 |
diff --git a/src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf b/src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf
|
|
|
87c116 |
new file mode 100644
|
|
|
87c116 |
index 00000000..465ff550
|
|
|
87c116 |
--- /dev/null
|
|
|
87c116 |
+++ b/src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf
|
|
|
87c116 |
@@ -0,0 +1,5 @@
|
|
|
87c116 |
+Comment "USB-audio on Dell WD19 docking station"
|
|
|
87c116 |
+SectionUseCase."HiFi" {
|
|
|
87c116 |
+ File "HiFi.conf"
|
|
|
87c116 |
+ Comment "Default"
|
|
|
87c116 |
+}
|
|
|
87c116 |
diff --git a/src/conf/ucm/Dell-WD19-Dock/HiFi.conf b/src/conf/ucm/Dell-WD19-Dock/HiFi.conf
|
|
|
87c116 |
new file mode 100644
|
|
|
87c116 |
index 00000000..e1427a79
|
|
|
87c116 |
--- /dev/null
|
|
|
87c116 |
+++ b/src/conf/ucm/Dell-WD19-Dock/HiFi.conf
|
|
|
87c116 |
@@ -0,0 +1,26 @@
|
|
|
87c116 |
+SectionDevice."Headphone" {
|
|
|
87c116 |
+ Comment "Headphone"
|
|
|
87c116 |
+
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ PlaybackChannels "2"
|
|
|
87c116 |
+ PlaybackPCM "hw:Dock,0"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionDevice."Speaker" {
|
|
|
87c116 |
+ Comment "Speaker"
|
|
|
87c116 |
+
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ PlaybackChannels "2"
|
|
|
87c116 |
+ PlaybackPCM "hw:Dock,1"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionDevice."Mic" {
|
|
|
87c116 |
+ Comment "Microphone"
|
|
|
87c116 |
+
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ CaptureChannels "2"
|
|
|
87c116 |
+ CapturePCM "hw:Dock,0"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
diff --git a/src/conf/ucm/Dell-WD19-Dock/Makefile.am b/src/conf/ucm/Dell-WD19-Dock/Makefile.am
|
|
|
87c116 |
new file mode 100644
|
|
|
87c116 |
index 00000000..6549ae1b
|
|
|
87c116 |
--- /dev/null
|
|
|
87c116 |
+++ b/src/conf/ucm/Dell-WD19-Dock/Makefile.am
|
|
|
87c116 |
@@ -0,0 +1,4 @@
|
|
|
87c116 |
+alsaconfigdir = @ALSA_CONFIG_DIR@
|
|
|
87c116 |
+ucmdir = $(alsaconfigdir)/ucm/Dell-WD19-Dock
|
|
|
87c116 |
+ucm_DATA = Dell-WD19-Dock.conf HiFi.conf
|
|
|
87c116 |
+EXTRA_DIST = $(ucm_DATA)
|
|
|
87c116 |
--
|
|
|
87c116 |
2.20.1
|
|
|
87c116 |
|
|
|
87c116 |
|
|
|
87c116 |
From 0862458c1339eec025330b39d5199481c335673c Mon Sep 17 00:00:00 2001
|
|
|
87c116 |
From: Jaroslav Kysela <perex@perex.cz>
|
|
|
87c116 |
Date: Fri, 25 Jan 2019 12:09:31 +0100
|
|
|
87c116 |
Subject: [PATCH 3/7] Revert "conf/ucm: Add a UCM profile for Dell WD19 Dock
|
|
|
87c116 |
USB-audio"
|
|
|
87c116 |
|
|
|
87c116 |
This reverts commit d8013619c942dd996c32337a9ade429bfaf455ee.
|
|
|
87c116 |
|
|
|
87c116 |
The USB driver defines identical profile as for WD15.
|
|
|
87c116 |
|
|
|
87c116 |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
87c116 |
---
|
|
|
87c116 |
.../ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf | 5 ----
|
|
|
87c116 |
src/conf/ucm/Dell-WD19-Dock/HiFi.conf | 26 -------------------
|
|
|
87c116 |
src/conf/ucm/Dell-WD19-Dock/Makefile.am | 4 ---
|
|
|
87c116 |
3 files changed, 35 deletions(-)
|
|
|
87c116 |
delete mode 100644 src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf
|
|
|
87c116 |
delete mode 100644 src/conf/ucm/Dell-WD19-Dock/HiFi.conf
|
|
|
87c116 |
delete mode 100644 src/conf/ucm/Dell-WD19-Dock/Makefile.am
|
|
|
87c116 |
|
|
|
87c116 |
diff --git a/src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf b/src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf
|
|
|
87c116 |
deleted file mode 100644
|
|
|
87c116 |
index 465ff550..00000000
|
|
|
87c116 |
--- a/src/conf/ucm/Dell-WD19-Dock/Dell-WD19-Dock.conf
|
|
|
87c116 |
+++ /dev/null
|
|
|
87c116 |
@@ -1,5 +0,0 @@
|
|
|
87c116 |
-Comment "USB-audio on Dell WD19 docking station"
|
|
|
87c116 |
-SectionUseCase."HiFi" {
|
|
|
87c116 |
- File "HiFi.conf"
|
|
|
87c116 |
- Comment "Default"
|
|
|
87c116 |
-}
|
|
|
87c116 |
diff --git a/src/conf/ucm/Dell-WD19-Dock/HiFi.conf b/src/conf/ucm/Dell-WD19-Dock/HiFi.conf
|
|
|
87c116 |
deleted file mode 100644
|
|
|
87c116 |
index e1427a79..00000000
|
|
|
87c116 |
--- a/src/conf/ucm/Dell-WD19-Dock/HiFi.conf
|
|
|
87c116 |
+++ /dev/null
|
|
|
87c116 |
@@ -1,26 +0,0 @@
|
|
|
87c116 |
-SectionDevice."Headphone" {
|
|
|
87c116 |
- Comment "Headphone"
|
|
|
87c116 |
-
|
|
|
87c116 |
- Value {
|
|
|
87c116 |
- PlaybackChannels "2"
|
|
|
87c116 |
- PlaybackPCM "hw:Dock,0"
|
|
|
87c116 |
- }
|
|
|
87c116 |
-}
|
|
|
87c116 |
-
|
|
|
87c116 |
-SectionDevice."Speaker" {
|
|
|
87c116 |
- Comment "Speaker"
|
|
|
87c116 |
-
|
|
|
87c116 |
- Value {
|
|
|
87c116 |
- PlaybackChannels "2"
|
|
|
87c116 |
- PlaybackPCM "hw:Dock,1"
|
|
|
87c116 |
- }
|
|
|
87c116 |
-}
|
|
|
87c116 |
-
|
|
|
87c116 |
-SectionDevice."Mic" {
|
|
|
87c116 |
- Comment "Microphone"
|
|
|
87c116 |
-
|
|
|
87c116 |
- Value {
|
|
|
87c116 |
- CaptureChannels "2"
|
|
|
87c116 |
- CapturePCM "hw:Dock,0"
|
|
|
87c116 |
- }
|
|
|
87c116 |
-}
|
|
|
87c116 |
diff --git a/src/conf/ucm/Dell-WD19-Dock/Makefile.am b/src/conf/ucm/Dell-WD19-Dock/Makefile.am
|
|
|
87c116 |
deleted file mode 100644
|
|
|
87c116 |
index 6549ae1b..00000000
|
|
|
87c116 |
--- a/src/conf/ucm/Dell-WD19-Dock/Makefile.am
|
|
|
87c116 |
+++ /dev/null
|
|
|
87c116 |
@@ -1,4 +0,0 @@
|
|
|
87c116 |
-alsaconfigdir = @ALSA_CONFIG_DIR@
|
|
|
87c116 |
-ucmdir = $(alsaconfigdir)/ucm/Dell-WD19-Dock
|
|
|
87c116 |
-ucm_DATA = Dell-WD19-Dock.conf HiFi.conf
|
|
|
87c116 |
-EXTRA_DIST = $(ucm_DATA)
|
|
|
87c116 |
--
|
|
|
87c116 |
2.20.1
|
|
|
87c116 |
|
|
|
87c116 |
|
|
|
87c116 |
From 7442c8b9be91ef576871eed5efce9499fcdeab4a Mon Sep 17 00:00:00 2001
|
|
|
87c116 |
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
|
|
87c116 |
Date: Tue, 29 Jan 2019 10:48:28 +0000
|
|
|
87c116 |
Subject: [PATCH 4/7] ucm: Add ucm files for DB820c board
|
|
|
87c116 |
|
|
|
87c116 |
DB820c board is based of MSM8996 Qualcomm SoC, which has support for both
|
|
|
87c116 |
Digital and Analog audio. Digital audio is over HDMI and analog is over
|
|
|
87c116 |
WCD9335 codec via SLIMbus.
|
|
|
87c116 |
|
|
|
87c116 |
Board itself has HDMI port, a 3.5mm audio Jack and an Audio expansion
|
|
|
87c116 |
connector.
|
|
|
87c116 |
This patch adds support for HDMI port and 3.5mm jack.
|
|
|
87c116 |
|
|
|
87c116 |
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
|
|
87c116 |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
87c116 |
---
|
|
|
87c116 |
configure.ac | 1 +
|
|
|
87c116 |
src/conf/ucm/DB820c/DB820c.conf | 9 +++
|
|
|
87c116 |
src/conf/ucm/DB820c/HDMI | 37 +++++++++++
|
|
|
87c116 |
src/conf/ucm/DB820c/HiFi | 110 ++++++++++++++++++++++++++++++++
|
|
|
87c116 |
src/conf/ucm/DB820c/Makefile.am | 4 ++
|
|
|
87c116 |
src/conf/ucm/Makefile.am | 1 +
|
|
|
87c116 |
6 files changed, 162 insertions(+)
|
|
|
87c116 |
create mode 100644 src/conf/ucm/DB820c/DB820c.conf
|
|
|
87c116 |
create mode 100644 src/conf/ucm/DB820c/HDMI
|
|
|
87c116 |
create mode 100644 src/conf/ucm/DB820c/HiFi
|
|
|
87c116 |
create mode 100644 src/conf/ucm/DB820c/Makefile.am
|
|
|
87c116 |
|
|
|
87c116 |
diff --git a/configure.ac b/configure.ac
|
|
|
87c116 |
index a0c346ef..e9e1a369 100644
|
|
|
87c116 |
--- a/configure.ac
|
|
|
87c116 |
+++ b/configure.ac
|
|
|
87c116 |
@@ -747,6 +747,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
|
|
87c116 |
src/conf/ucm/cube-i1_TF-Defaultstring-CherryTrailCR/Makefile \
|
|
|
87c116 |
src/conf/ucm/DAISY-I2S/Makefile \
|
|
|
87c116 |
src/conf/ucm/DB410c/Makefile \
|
|
|
87c116 |
+ src/conf/ucm/DB820c/Makefile \
|
|
|
87c116 |
src/conf/ucm/Dell-WD15-Dock/Makefile \
|
|
|
87c116 |
src/conf/ucm/GoogleNyan/Makefile \
|
|
|
87c116 |
src/conf/ucm/gpd-win-pocket-rt5645/Makefile \
|
|
|
87c116 |
diff --git a/src/conf/ucm/DB820c/DB820c.conf b/src/conf/ucm/DB820c/DB820c.conf
|
|
|
87c116 |
new file mode 100644
|
|
|
87c116 |
index 00000000..58b7ff4e
|
|
|
87c116 |
--- /dev/null
|
|
|
87c116 |
+++ b/src/conf/ucm/DB820c/DB820c.conf
|
|
|
87c116 |
@@ -0,0 +1,9 @@
|
|
|
87c116 |
+SectionUseCase."HiFi" {
|
|
|
87c116 |
+ File "HiFi"
|
|
|
87c116 |
+ Comment "HiFi quality Music."
|
|
|
87c116 |
+}
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionUseCase."HDMI" {
|
|
|
87c116 |
+ File "HDMI"
|
|
|
87c116 |
+ Comment "HDMI output."
|
|
|
87c116 |
+}
|
|
|
87c116 |
diff --git a/src/conf/ucm/DB820c/HDMI b/src/conf/ucm/DB820c/HDMI
|
|
|
87c116 |
new file mode 100644
|
|
|
87c116 |
index 00000000..39b28692
|
|
|
87c116 |
--- /dev/null
|
|
|
87c116 |
+++ b/src/conf/ucm/DB820c/HDMI
|
|
|
87c116 |
@@ -0,0 +1,37 @@
|
|
|
87c116 |
+# Use case configuration for DB820c board.
|
|
|
87c116 |
+# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionVerb {
|
|
|
87c116 |
+ EnableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='HDMI Mixer MultiMedia1' 1"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ DisableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='HDMI Mixer MultiMedia1' 0"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ TQ "HiFi"
|
|
|
87c116 |
+ PlaybackPCM "plughw:0,0"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionDevice."HDMI-stereo" {
|
|
|
87c116 |
+ #Name "HDMI-stereo"
|
|
|
87c116 |
+ Comment "HDMI Digital Stereo Output"
|
|
|
87c116 |
+
|
|
|
87c116 |
+ EnableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='HDMI Mixer MultiMedia1' 1"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ DisableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='HDMI Mixer MultiMedia1' 0"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ PlaybackChannels "2"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
diff --git a/src/conf/ucm/DB820c/HiFi b/src/conf/ucm/DB820c/HiFi
|
|
|
87c116 |
new file mode 100644
|
|
|
87c116 |
index 00000000..4457329f
|
|
|
87c116 |
--- /dev/null
|
|
|
87c116 |
+++ b/src/conf/ucm/DB820c/HiFi
|
|
|
87c116 |
@@ -0,0 +1,110 @@
|
|
|
87c116 |
+# Use case configuration for DB820c board.
|
|
|
87c116 |
+# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionVerb {
|
|
|
87c116 |
+
|
|
|
87c116 |
+ EnableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='SLIM RX0 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX1 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX2 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX3 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX4 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX5 MUX' AIF4_PB"
|
|
|
87c116 |
+ cset "name='SLIM RX6 MUX' AIF4_PB"
|
|
|
87c116 |
+ cset "name='SLIM RX7 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='RX INT1_2 MUX' RX5"
|
|
|
87c116 |
+ cset "name='RX INT2_2 MUX' RX6"
|
|
|
87c116 |
+ ## gain to 0dB
|
|
|
87c116 |
+ cset "name='RX5 Digital Volume' 68"
|
|
|
87c116 |
+ ## gain to 0dB
|
|
|
87c116 |
+ cset "name='RX6 Digital Volume' 68"
|
|
|
87c116 |
+ cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 1"
|
|
|
87c116 |
+ cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 1"
|
|
|
87c116 |
+ cset "name='RX INT1 DEM MUX' CLSH_DSM_OUT"
|
|
|
87c116 |
+ cset "name='RX INT2 DEM MUX' CLSH_DSM_OUT"
|
|
|
87c116 |
+ cset "name='AIF1_CAP Mixer SLIM TX0' 1"
|
|
|
87c116 |
+ cset "name='SLIM TX0 MUX' DEC0"
|
|
|
87c116 |
+ cset "name='ADC2 Volume' 12"
|
|
|
87c116 |
+ cset "name='ADC MUX0' AMIC"
|
|
|
87c116 |
+ cset "name='AMIC MUX0' ADC2"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ DisableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 0"
|
|
|
87c116 |
+ cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 0"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ # ALSA PCM
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ # ALSA PCM device for HiFi
|
|
|
87c116 |
+ PlaybackPCM "plughw:0,1"
|
|
|
87c116 |
+ CapturePCM "plughw:0,2"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionDevice."Headphones" {
|
|
|
87c116 |
+ Comment "Headphones playback"
|
|
|
87c116 |
+
|
|
|
87c116 |
+ EnableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='SLIM RX0 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX1 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX2 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX3 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX4 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX5 MUX' AIF4_PB"
|
|
|
87c116 |
+ cset "name='SLIM RX6 MUX' AIF4_PB"
|
|
|
87c116 |
+ cset "name='SLIM RX7 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='RX INT1_2 MUX' RX5"
|
|
|
87c116 |
+ cset "name='RX INT2_2 MUX' RX6"
|
|
|
87c116 |
+ ## gain to 0dB
|
|
|
87c116 |
+ cset "name='RX5 Digital Volume' 68"
|
|
|
87c116 |
+ ## gain to 0dB
|
|
|
87c116 |
+ cset "name='RX6 Digital Volume' 68"
|
|
|
87c116 |
+ cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 1"
|
|
|
87c116 |
+ cset "name='RX INT1 DEM MUX' CLSH_DSM_OUT"
|
|
|
87c116 |
+ cset "name='RX INT2 DEM MUX' CLSH_DSM_OUT"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ DisableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='RX5 Digital Volume' 0"
|
|
|
87c116 |
+ cset "name='RX6 Digital Volume' 0"
|
|
|
87c116 |
+ cset "name='SLIM RX5 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM RX6 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 0"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ PlaybackChannels "2"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
+
|
|
|
87c116 |
+SectionDevice."Handset" {
|
|
|
87c116 |
+ Comment "Headset Microphone"
|
|
|
87c116 |
+
|
|
|
87c116 |
+ EnableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 1"
|
|
|
87c116 |
+ cset "name='AIF1_CAP Mixer SLIM TX0' 1"
|
|
|
87c116 |
+ cset "name='SLIM TX0 MUX' DEC0"
|
|
|
87c116 |
+ cset "name='ADC2 Volume' 12"
|
|
|
87c116 |
+ cset "name='ADC MUX0' AMIC"
|
|
|
87c116 |
+ cset "name='AMIC MUX0' ADC2"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ DisableSequence [
|
|
|
87c116 |
+ cdev "hw:0"
|
|
|
87c116 |
+ cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 0"
|
|
|
87c116 |
+ cset "name='AIF1_CAP Mixer SLIM TX0' 0"
|
|
|
87c116 |
+ cset "name='AMIC MUX0' ZERO"
|
|
|
87c116 |
+ cset "name='SLIM TX0 MUX' ZERO"
|
|
|
87c116 |
+ cset "name='ADC2 Volume' 0"
|
|
|
87c116 |
+ ]
|
|
|
87c116 |
+
|
|
|
87c116 |
+ Value {
|
|
|
87c116 |
+ CaptureChannels "1"
|
|
|
87c116 |
+ }
|
|
|
87c116 |
+}
|
|
|
87c116 |
diff --git a/src/conf/ucm/DB820c/Makefile.am b/src/conf/ucm/DB820c/Makefile.am
|
|
|
87c116 |
new file mode 100644
|
|
|
87c116 |
index 00000000..16e985e5
|
|
|
87c116 |
--- /dev/null
|
|
|
87c116 |
+++ b/src/conf/ucm/DB820c/Makefile.am
|
|
|
87c116 |
@@ -0,0 +1,4 @@
|
|
|
87c116 |
+alsaconfigdir = @ALSA_CONFIG_DIR@
|
|
|
87c116 |
+ucmdir = $(alsaconfigdir)/ucm/DB820c
|
|
|
87c116 |
+ucm_DATA = DB820c.conf HDMI HiFi
|
|
|
87c116 |
+EXTRA_DIST = $(ucm_DATA)
|
|
|
87c116 |
diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
|
|
|
87c116 |
index ee850ee6..e9f88ed6 100644
|
|
|
87c116 |
--- a/src/conf/ucm/Makefile.am
|
|
|
87c116 |
+++ b/src/conf/ucm/Makefile.am
|
|
|
87c116 |
@@ -31,6 +31,7 @@ chtrt5650 \
|
|
|
87c116 |
cube-i1_TF-Defaultstring-CherryTrailCR \
|
|
|
87c116 |
DAISY-I2S \
|
|
|
87c116 |
DB410c \
|
|
|
87c116 |
+DB820c \
|
|
|
87c116 |
Dell-WD15-Dock \
|
|
|
87c116 |
GoogleNyan \
|
|
|
87c116 |
gpd-win-pocket-rt5645 \
|
|
|
87c116 |
--
|
|
|
87c116 |
2.20.1
|
|
|
87c116 |
|
|
|
87c116 |
|
|
|
87c116 |
From 4d9374e61d23a5fc219ec172fe9613017f9ae79c Mon Sep 17 00:00:00 2001
|
|
|
87c116 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
|
87c116 |
Date: Sun, 3 Feb 2019 12:37:41 +0100
|
|
|
87c116 |
Subject: [PATCH 5/7] ucm: bytcr/PlatformEnableSeq.conf update some comments
|
|
|
87c116 |
|
|
|
87c116 |
Commit f91cc3c7d6b7 ("Update chtrt5645 ucm variants to use
|
|
|
87c116 |
bytcr/PlatformEnableSeq.conf component") updated the
|
|
|
87c116 |
following 2 comments:
|
|
|
87c116 |
|
|
|
87c116 |
# codec0_out settings (used if SSP2 is connected to aif1)
|
|
|
87c116 |
# modem_out settings (used if SSP0 is connected to aif2)
|
|
|
87c116 |
|
|
|
87c116 |
Specifically it added the " to aif1" resp. " to aif2" part of the comments.
|
|
|
87c116 |
|
|
|
87c116 |
This is not correct, AIF1 / AIF2 are something which is present on
|
|
|
87c116 |
Realtek codecs only, and either one can be used indepedent of
|
|
|
87c116 |
SSP0 or SSP2 being used (the comments in the chtrt5645 UCM profile
|
|
|
87c116 |
before this change were wrong / outdated).
|
|
|
87c116 |
|
|
|
87c116 |
Besides there not being any relationship between SSP0 or SSP2 being
|
|
|
87c116 |
used, bytcr/PlatformEnableSeq.conf is also used with other codecs,
|
|
|
87c116 |
e.g. the ESS8316 codec where this is not applicable at all.
|
|
|
87c116 |
|
|
|
87c116 |
Therefor this commit removes the " to aif?" part of the comments again
|
|
|
87c116 |
to avoid confusing people reading this in the future.
|
|
|
87c116 |
|
|
|
87c116 |
Cc: Russell Parker <russell.parker7@gmail.com>
|
|
|
87c116 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
87c116 |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
87c116 |
---
|
|
|
87c116 |
src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf | 4 ++--
|
|
|
87c116 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
87c116 |
|
|
|
87c116 |
diff --git a/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf b/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf
|
|
|
87c116 |
index 6f5e899c..b5ee2b41 100644
|
|
|
87c116 |
--- a/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf
|
|
|
87c116 |
+++ b/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf
|
|
|
87c116 |
@@ -29,7 +29,7 @@ cset "name='pcm0_in Gain 0 Volume' 0"
|
|
|
87c116 |
cset "name='pcm1_in Gain 0 Switch' off"
|
|
|
87c116 |
cset "name='pcm1_in Gain 0 Volume' 0%"
|
|
|
87c116 |
|
|
|
87c116 |
-# codec0_out settings (used if SSP2 is connected to aif1)
|
|
|
87c116 |
+# codec0_out settings (used if SSP2 is connected)
|
|
|
87c116 |
cset "name='codec_out0 mix 0 codec_in0 Switch' off"
|
|
|
87c116 |
cset "name='codec_out0 mix 0 codec_in1 Switch' off"
|
|
|
87c116 |
cset "name='codec_out0 mix 0 media_loop1_in Switch' off"
|
|
|
87c116 |
@@ -40,7 +40,7 @@ cset "name='codec_out0 mix 0 sprot_loop_in Switch' off"
|
|
|
87c116 |
cset "name='codec_out0 Gain 0 Switch' on"
|
|
|
87c116 |
cset "name='codec_out0 Gain 0 Volume' 0"
|
|
|
87c116 |
|
|
|
87c116 |
-# modem_out settings (used if SSP0 is connected to aif2)
|
|
|
87c116 |
+# modem_out settings (used if SSP0 is connected)
|
|
|
87c116 |
cset "name='modem_out mix 0 codec_in0 Switch' off"
|
|
|
87c116 |
cset "name='modem_out mix 0 codec_in1 Switch' off"
|
|
|
87c116 |
cset "name='modem_out mix 0 media_loop1_in Switch' off"
|
|
|
87c116 |
--
|
|
|
87c116 |
2.20.1
|
|
|
87c116 |
|
|
|
87c116 |
|
|
|
87c116 |
From 7cea8c156204ebae7c0dc60801dde5ddfa5bb7d0 Mon Sep 17 00:00:00 2001
|
|
|
87c116 |
From: Brendan Shanks <brendan.shanks@teradek.com>
|
|
|
87c116 |
Date: Mon, 11 Feb 2019 11:51:26 -0800
|
|
|
87c116 |
Subject: [PATCH 6/7] pcm: dshare: Fix overflow when slave_hw_ptr rolls over
|
|
|
87c116 |
boundary
|
|
|
87c116 |
MIME-Version: 1.0
|
|
|
87c116 |
Content-Type: text/plain; charset=UTF-8
|
|
|
87c116 |
Content-Transfer-Encoding: 8bit
|
|
|
87c116 |
|
|
|
87c116 |
In snd_pcm_dshare_sync_area() when 'slave_hw_ptr' rolls over
|
|
|
87c116 |
'slave_boundary', the wrong variable is checked ('dshare->slave_hw_ptr' vs
|
|
|
87c116 |
the local 'slave_hw_ptr'). In some cases, this results in 'slave_hw_ptr'
|
|
|
87c116 |
not rolling over correctly. 'slave_size' and 'size' are then much too
|
|
|
87c116 |
large, and the for loop blocks for several minutes copying samples.
|
|
|
87c116 |
|
|
|
87c116 |
This was likely only triggered on 32-bit systems, since the PCM boundary
|
|
|
87c116 |
is computed based on LONG_MAX and is much larger on 64-bit systems.
|
|
|
87c116 |
|
|
|
87c116 |
This same change was made to pcm_dmix in commit
|
|
|
87c116 |
6c7f60f7a982fdba828e4530a9d7aa0aa2b704ae ("Fix boundary overlap”) from
|
|
|
87c116 |
June 2005.
|
|
|
87c116 |
|
|
|
87c116 |
Signed-off-by: Brendan Shanks <brendan.shanks@teradek.com>
|
|
|
87c116 |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
87c116 |
---
|
|
|
87c116 |
src/pcm/pcm_dshare.c | 2 +-
|
|
|
87c116 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
87c116 |
|
|
|
87c116 |
diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
|
|
|
87c116 |
index 2bb735fe..f135b5df 100644
|
|
|
87c116 |
--- a/src/pcm/pcm_dshare.c
|
|
|
87c116 |
+++ b/src/pcm/pcm_dshare.c
|
|
|
87c116 |
@@ -121,7 +121,7 @@ static void snd_pcm_dshare_sync_area(snd_pcm_t *pcm)
|
|
|
87c116 |
*/
|
|
|
87c116 |
slave_hw_ptr -= slave_hw_ptr % dshare->slave_period_size;
|
|
|
87c116 |
slave_hw_ptr += dshare->slave_buffer_size;
|
|
|
87c116 |
- if (dshare->slave_hw_ptr > dshare->slave_boundary)
|
|
|
87c116 |
+ if (slave_hw_ptr >= dshare->slave_boundary)
|
|
|
87c116 |
slave_hw_ptr -= dshare->slave_boundary;
|
|
|
87c116 |
if (slave_hw_ptr < dshare->slave_appl_ptr)
|
|
|
87c116 |
slave_size = slave_hw_ptr + (dshare->slave_boundary - dshare->slave_appl_ptr);
|
|
|
87c116 |
--
|
|
|
87c116 |
2.20.1
|
|
|
87c116 |
|
|
|
87c116 |
|
|
|
87c116 |
From deb07a0b208225393efc6347556310f3d8adb54d Mon Sep 17 00:00:00 2001
|
|
|
87c116 |
From: Jaroslav Kysela <perex@perex.cz>
|
|
|
87c116 |
Date: Fri, 1 Mar 2019 12:43:19 +0100
|
|
|
87c116 |
Subject: [PATCH 7/7] test/latency: use frame bytes correctly in writebuf()
|
|
|
87c116 |
|
|
|
87c116 |
Reported-by: Alessandro Lapini <alessandro.lapini@gmail.com>
|
|
|
87c116 |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
87c116 |
---
|
|
|
87c116 |
test/latency.c | 3 ++-
|
|
|
87c116 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
87c116 |
|
|
|
87c116 |
diff --git a/test/latency.c b/test/latency.c
|
|
|
87c116 |
index e926856b..ddd5a7af 100644
|
|
|
87c116 |
--- a/test/latency.c
|
|
|
87c116 |
+++ b/test/latency.c
|
|
|
87c116 |
@@ -374,6 +374,7 @@ long readbuf(snd_pcm_t *handle, char *buf, long len, size_t *frames, size_t *max
|
|
|
87c116 |
long writebuf(snd_pcm_t *handle, char *buf, long len, size_t *frames)
|
|
|
87c116 |
{
|
|
|
87c116 |
long r;
|
|
|
87c116 |
+ int frame_bytes = (snd_pcm_format_width(format) / 8) * channels;
|
|
|
87c116 |
|
|
|
87c116 |
while (len > 0) {
|
|
|
87c116 |
r = snd_pcm_writei(handle, buf, len);
|
|
|
87c116 |
@@ -383,7 +384,7 @@ long writebuf(snd_pcm_t *handle, char *buf, long len, size_t *frames)
|
|
|
87c116 |
if (r < 0)
|
|
|
87c116 |
return r;
|
|
|
87c116 |
// showstat(handle, 0);
|
|
|
87c116 |
- buf += r * 4;
|
|
|
87c116 |
+ buf += r * frame_bytes;
|
|
|
87c116 |
len -= r;
|
|
|
87c116 |
*frames += r;
|
|
|
87c116 |
}
|
|
|
87c116 |
--
|
|
|
87c116 |
2.20.1
|
|
|
87c116 |
|