Skip to content

Commit

Permalink
Merge tag 'LA.UM.8.6.2.r1-08600-89xx.0' of https://source.codeaurora.…
Browse files Browse the repository at this point in the history
…org/quic/la/platform/vendor/opensource/audio-kernel into R

"LA.UM.8.6.2.r1-08600-89xx.0"

Change-Id: Ibd749e0165e1be6d4e175238bf7e8cd086a2fc2e
  • Loading branch information
Linux Build Service Account authored and MumetNgoding committed Oct 9, 2020
1 parent c2a4d96 commit d340fba
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 10 deletions.
29 changes: 25 additions & 4 deletions techpack/audio/asoc/msm-pcm-loopback-v2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2013-2017, 2019 The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2017, 2019-2020 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -489,10 +489,21 @@ static int msm_pcm_volume_ctl_put(struct snd_kcontrol *kcontrol,
{
int rc = 0;
struct snd_pcm_volume *vol = kcontrol->private_data;
struct snd_pcm_substream *substream = vol->pcm->streams[0].substream;
struct snd_pcm_substream *substream = NULL;
struct msm_pcm_loopback *prtd;
int volume = ucontrol->value.integer.value[0];

if (!vol) {
pr_err("%s: vol is NULL\n", __func__);
return -ENODEV;
}

if (!vol->pcm) {
pr_err("%s: vol->pcm is NULL\n", __func__);
return -ENODEV;
}

substream = vol->pcm->streams[0].substream;
pr_debug("%s: volume : 0x%x\n", __func__, volume);
if ((!substream) || (!substream->runtime)) {
pr_err("%s substream or runtime not found\n", __func__);
Expand All @@ -518,11 +529,21 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol,
{
int rc = 0;
struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol);
struct snd_pcm_substream *substream =
vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
struct snd_pcm_substream *substream = NULL;
struct msm_pcm_loopback *prtd;

pr_debug("%s\n", __func__);
if (!vol) {
pr_err("%s: vol is NULL\n", __func__);
return -ENODEV;
}

if (!vol->pcm) {
pr_err("%s: vol->pcm is NULL\n", __func__);
return -ENODEV;
}

substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
if ((!substream) || (!substream->runtime)) {
pr_err("%s substream or runtime not found\n", __func__);
rc = -ENODEV;
Expand Down
28 changes: 25 additions & 3 deletions techpack/audio/asoc/msm-pcm-q6-noirq.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -667,6 +667,17 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol,
struct msm_audio *prtd;

pr_debug("%s\n", __func__);
if (!vol) {
pr_err("%s: vol is NULL\n", __func__);
return -ENODEV;
}

if (!vol->pcm) {
pr_err("%s: vol->pcm is NULL\n", __func__);
return -ENODEV;
}

substream = vol->pcm->streams[vol->stream].substream;
if (!substream) {
pr_err("%s substream not found\n", __func__);
return -ENODEV;
Expand Down Expand Up @@ -698,12 +709,23 @@ static int msm_pcm_volume_ctl_put(struct snd_kcontrol *kcontrol,
int rc = 0;
struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol);
struct msm_plat_data *pdata = NULL;
struct snd_pcm_substream *substream =
vol->pcm->streams[vol->stream].substream;
struct snd_pcm_substream *substream = NULL;
struct snd_soc_pcm_runtime *soc_prtd = NULL;
struct msm_audio *prtd;
int volume = ucontrol->value.integer.value[0];

pr_debug("%s\n", __func__);
if (!vol) {
pr_err("%s: vol is NULL\n", __func__);
return -ENODEV;
}

if (!vol->pcm) {
pr_err("%s: vol->pcm is NULL\n", __func__);
return -ENODEV;
}

substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
pr_debug("%s: volume : 0x%x\n", __func__, volume);
if (!substream) {
pr_err("%s substream not found\n", __func__);
Expand Down
27 changes: 24 additions & 3 deletions techpack/audio/asoc/msm-pcm-q6-v2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -1385,6 +1385,17 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol,
struct msm_audio *prtd;

pr_debug("%s\n", __func__);
if (!vol) {
pr_err("%s: vol is NULL\n", __func__);
return -ENODEV;
}

if (!vol->pcm) {
pr_err("%s: vol->pcm is NULL\n", __func__);
return -ENODEV;
}

substream = vol->pcm->streams[vol->stream].substream;
if (!substream) {
pr_err("%s substream not found\n", __func__);
return -ENODEV;
Expand Down Expand Up @@ -1416,14 +1427,24 @@ static int msm_pcm_volume_ctl_put(struct snd_kcontrol *kcontrol,
{
int rc = 0;
struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol);
struct snd_pcm_substream *substream =
vol->pcm->streams[vol->stream].substream;
struct snd_pcm_substream *substream = NULL;
struct msm_audio *prtd;
int volume = ucontrol->value.integer.value[0];
struct msm_plat_data *pdata = NULL;
struct snd_soc_pcm_runtime *soc_prtd = NULL;

pr_debug("%s: volume : 0x%x\n", __func__, volume);
if (!vol) {
pr_err("%s: vol is NULL\n", __func__);
return -ENODEV;
}

if (!vol->pcm) {
pr_err("%s: vol->pcm is NULL\n", __func__);
return -ENODEV;
}

substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
if (!substream) {
pr_err("%s: substream not found\n", __func__);
return -ENODEV;
Expand Down
30 changes: 30 additions & 0 deletions techpack/audio/asoc/sdm660-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,14 @@ static unsigned int tdm_param_set_slot_mask(u16 port_id, int slot_width,
case AFE_PORT_ID_PRIMARY_TDM_RX_5:
case AFE_PORT_ID_PRIMARY_TDM_RX_6:
case AFE_PORT_ID_PRIMARY_TDM_RX_7:
case AFE_PORT_ID_SECONDARY_TDM_RX:
case AFE_PORT_ID_SECONDARY_TDM_RX_1:
case AFE_PORT_ID_SECONDARY_TDM_RX_2:
case AFE_PORT_ID_SECONDARY_TDM_RX_3:
case AFE_PORT_ID_SECONDARY_TDM_RX_4:
case AFE_PORT_ID_SECONDARY_TDM_RX_5:
case AFE_PORT_ID_SECONDARY_TDM_RX_6:
case AFE_PORT_ID_SECONDARY_TDM_RX_7:
case AFE_PORT_ID_TERTIARY_TDM_RX:
case AFE_PORT_ID_TERTIARY_TDM_RX_1:
case AFE_PORT_ID_TERTIARY_TDM_RX_2:
Expand All @@ -665,6 +673,14 @@ static unsigned int tdm_param_set_slot_mask(u16 port_id, int slot_width,
case AFE_PORT_ID_PRIMARY_TDM_TX_5:
case AFE_PORT_ID_PRIMARY_TDM_TX_6:
case AFE_PORT_ID_PRIMARY_TDM_TX_7:
case AFE_PORT_ID_SECONDARY_TDM_TX:
case AFE_PORT_ID_SECONDARY_TDM_TX_1:
case AFE_PORT_ID_SECONDARY_TDM_TX_2:
case AFE_PORT_ID_SECONDARY_TDM_TX_3:
case AFE_PORT_ID_SECONDARY_TDM_TX_4:
case AFE_PORT_ID_SECONDARY_TDM_TX_5:
case AFE_PORT_ID_SECONDARY_TDM_TX_6:
case AFE_PORT_ID_SECONDARY_TDM_TX_7:
case AFE_PORT_ID_TERTIARY_TDM_TX:
case AFE_PORT_ID_TERTIARY_TDM_TX_1:
case AFE_PORT_ID_TERTIARY_TDM_TX_2:
Expand Down Expand Up @@ -4999,7 +5015,21 @@ static int msm_get_tdm_mode(u32 port_id)
tdm_mode = TDM_PRI;
break;
case AFE_PORT_ID_SECONDARY_TDM_RX:
case AFE_PORT_ID_SECONDARY_TDM_RX_1:
case AFE_PORT_ID_SECONDARY_TDM_RX_2:
case AFE_PORT_ID_SECONDARY_TDM_RX_3:
case AFE_PORT_ID_SECONDARY_TDM_RX_4:
case AFE_PORT_ID_SECONDARY_TDM_RX_5:
case AFE_PORT_ID_SECONDARY_TDM_RX_6:
case AFE_PORT_ID_SECONDARY_TDM_RX_7:
case AFE_PORT_ID_SECONDARY_TDM_TX:
case AFE_PORT_ID_SECONDARY_TDM_TX_1:
case AFE_PORT_ID_SECONDARY_TDM_TX_2:
case AFE_PORT_ID_SECONDARY_TDM_TX_3:
case AFE_PORT_ID_SECONDARY_TDM_TX_4:
case AFE_PORT_ID_SECONDARY_TDM_TX_5:
case AFE_PORT_ID_SECONDARY_TDM_TX_6:
case AFE_PORT_ID_SECONDARY_TDM_TX_7:
tdm_mode = TDM_SEC;
break;
case AFE_PORT_ID_TERTIARY_TDM_RX:
Expand Down

0 comments on commit d340fba

Please sign in to comment.