mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "asoc: add routing control for Multimedia17 with USB TX"
This commit is contained in:
commit
e06b1a4052
2 changed files with 23 additions and 1 deletions
|
|
@ -1460,6 +1460,12 @@ static int msm_lsm_ioctl_shared(struct snd_pcm_substream *substream,
|
|||
prtd->lsm_client->lab_started = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!atomic_read(&prtd->read_abort)) {
|
||||
dev_dbg(rtd->dev,
|
||||
"%s: set read_abort to stop buffering\n", __func__);
|
||||
atomic_set(&prtd->read_abort, 1);
|
||||
}
|
||||
rc = q6lsm_stop(prtd->lsm_client, true);
|
||||
if (!rc)
|
||||
dev_dbg(rtd->dev,
|
||||
|
|
@ -2665,6 +2671,12 @@ static int msm_lsm_close(struct snd_pcm_substream *substream)
|
|||
__func__, ret);
|
||||
}
|
||||
}
|
||||
|
||||
if (!atomic_read(&prtd->read_abort)) {
|
||||
dev_dbg(rtd->dev,
|
||||
"%s: set read_abort to stop buffering\n", __func__);
|
||||
atomic_set(&prtd->read_abort, 1);
|
||||
}
|
||||
ret = q6lsm_stop(prtd->lsm_client, true);
|
||||
if (ret)
|
||||
dev_err(rtd->dev,
|
||||
|
|
@ -2695,6 +2707,11 @@ static int msm_lsm_close(struct snd_pcm_substream *substream)
|
|||
SNDRV_PCM_STREAM_CAPTURE);
|
||||
|
||||
if (prtd->lsm_client->opened) {
|
||||
if (!atomic_read(&prtd->read_abort)) {
|
||||
dev_dbg(rtd->dev,
|
||||
"%s: set read_abort to stop buffering\n", __func__);
|
||||
atomic_set(&prtd->read_abort, 1);
|
||||
}
|
||||
q6lsm_close(prtd->lsm_client);
|
||||
prtd->lsm_client->opened = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
|
@ -14673,6 +14673,10 @@ static const struct snd_kcontrol_new mmul17_mixer_controls[] = {
|
|||
MSM_BACKEND_DAI_SLIMBUS_7_TX,
|
||||
MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer,
|
||||
msm_routing_put_audio_mixer),
|
||||
SOC_DOUBLE_EXT("USB_AUDIO_TX", SND_SOC_NOPM,
|
||||
MSM_BACKEND_DAI_USB_TX,
|
||||
MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer,
|
||||
msm_routing_put_audio_mixer),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new mmul18_mixer_controls[] = {
|
||||
|
|
@ -25644,6 +25648,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"MultiMedia17 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
|
||||
{"MultiMedia17 Mixer", "SLIM_1_TX", "SLIMBUS_1_TX"},
|
||||
{"MultiMedia17 Mixer", "SLIM_7_TX", "SLIMBUS_7_TX"},
|
||||
{"MultiMedia17 Mixer", "USB_AUDIO_TX", "USB_AUDIO_TX"},
|
||||
{"MultiMedia18 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
|
||||
{"MultiMedia18 Mixer", "SLIM_1_TX", "SLIMBUS_1_TX"},
|
||||
{"MultiMedia19 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
|
||||
|
|
|
|||
Loading…
Reference in a new issue