Loading sound/soc/msm/qdsp6v2/msm-pcm-loopback-v2.c +27 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-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 Loading Loading @@ -545,11 +545,23 @@ 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]; 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[0].substream; mutex_lock(&loopback_session_lock); if ((!substream) || (!substream->runtime)) { pr_err("%s substream or runtime not found\n", __func__); Loading Loading @@ -579,6 +591,19 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, 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; Loading sound/soc/msm/qdsp6v2/msm-pcm-q6-noirq.c +27 −5 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved. /* Copyright (c) 2016-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 Loading Loading @@ -662,12 +662,22 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct msm_plat_data *pdata = NULL; struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; struct snd_pcm_substream *substream = NULL; struct snd_soc_pcm_runtime *soc_prtd = NULL; 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[SNDRV_PCM_STREAM_PLAYBACK].substream; if (!substream) { pr_err("%s substream not found\n", __func__); return -ENODEV; Loading Loading @@ -699,13 +709,25 @@ 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[SNDRV_PCM_STREAM_PLAYBACK].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: 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; Loading sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c +25 −5 Original line number Diff line number Diff line /* 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 Loading Loading @@ -1389,12 +1389,22 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct msm_plat_data *pdata = NULL; struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; struct snd_pcm_substream *substream = NULL; struct snd_soc_pcm_runtime *soc_prtd = NULL; 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[SNDRV_PCM_STREAM_PLAYBACK].substream; if (!substream) { pr_err("%s substream not found\n", __func__); return -ENODEV; Loading Loading @@ -1426,14 +1436,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[SNDRV_PCM_STREAM_PLAYBACK].substream; struct snd_pcm_substream *substream = NULL; struct msm_audio *prtd; int volume = ucontrol->value.integer.value[0]; struct snd_soc_pcm_runtime *soc_prtd = NULL; struct msm_plat_data *pdata = 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; Loading Loading
sound/soc/msm/qdsp6v2/msm-pcm-loopback-v2.c +27 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-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 Loading Loading @@ -545,11 +545,23 @@ 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]; 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[0].substream; mutex_lock(&loopback_session_lock); if ((!substream) || (!substream->runtime)) { pr_err("%s substream or runtime not found\n", __func__); Loading Loading @@ -579,6 +591,19 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, 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; Loading
sound/soc/msm/qdsp6v2/msm-pcm-q6-noirq.c +27 −5 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved. /* Copyright (c) 2016-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 Loading Loading @@ -662,12 +662,22 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct msm_plat_data *pdata = NULL; struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; struct snd_pcm_substream *substream = NULL; struct snd_soc_pcm_runtime *soc_prtd = NULL; 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[SNDRV_PCM_STREAM_PLAYBACK].substream; if (!substream) { pr_err("%s substream not found\n", __func__); return -ENODEV; Loading Loading @@ -699,13 +709,25 @@ 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[SNDRV_PCM_STREAM_PLAYBACK].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: 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; Loading
sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c +25 −5 Original line number Diff line number Diff line /* 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 Loading Loading @@ -1389,12 +1389,22 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct msm_plat_data *pdata = NULL; struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; struct snd_pcm_substream *substream = NULL; struct snd_soc_pcm_runtime *soc_prtd = NULL; 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[SNDRV_PCM_STREAM_PLAYBACK].substream; if (!substream) { pr_err("%s substream not found\n", __func__); return -ENODEV; Loading Loading @@ -1426,14 +1436,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[SNDRV_PCM_STREAM_PLAYBACK].substream; struct snd_pcm_substream *substream = NULL; struct msm_audio *prtd; int volume = ucontrol->value.integer.value[0]; struct snd_soc_pcm_runtime *soc_prtd = NULL; struct msm_plat_data *pdata = 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; Loading