Loading asoc/msm-pcm-q6-noirq.c +13 −8 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; pr_debug("%s\n", __func__); Loading @@ -687,7 +687,7 @@ 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; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; int volume = ucontrol->value.integer.value[0]; Loading @@ -708,15 +708,16 @@ static int msm_pcm_volume_ctl_put(struct snd_kcontrol *kcontrol, return rc; } static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd) static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd, int stream) { int ret = 0; struct snd_pcm *pcm = rtd->pcm; struct snd_pcm_volume *volume_info; struct snd_kcontrol *kctl; dev_dbg(rtd->dev, "%s, Volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, dev_dbg(rtd->dev, "%s, volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, stream, NULL, 1, rtd->dai_link->id, &volume_info); if (ret < 0) { Loading Loading @@ -1223,12 +1224,16 @@ static int msm_asoc_pcm_new(struct snd_soc_pcm_runtime *rtd) pr_err("%s: Could not add pcm Channel Map Control\n", __func__); ret = msm_pcm_add_volume_control(rtd); ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_PLAYBACK); if (ret) { pr_err("%s: Could not add pcm Volume Control %d\n", pr_err("%s: Could not add pcm playback volume Control %d\n", __func__, ret); } ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_CAPTURE); if (ret) { pr_err("%s: Could not add pcm capture volume Control %d\n", __func__, ret); } ret = msm_pcm_add_fe_topology_control(rtd); if (ret) { pr_err("%s: Could not add pcm topology control %d\n", Loading asoc/msm-pcm-q6-v2.c +11 −7 Original line number Diff line number Diff line Loading @@ -1391,7 +1391,7 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; pr_debug("%s\n", __func__); Loading @@ -1415,7 +1415,7 @@ 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; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; int volume = ucontrol->value.integer.value[0]; Loading @@ -1436,15 +1436,16 @@ static int msm_pcm_volume_ctl_put(struct snd_kcontrol *kcontrol, return rc; } static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd) static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd, int stream) { int ret = 0; struct snd_pcm *pcm = rtd->pcm; struct snd_pcm_volume *volume_info; struct snd_kcontrol *kctl; dev_dbg(rtd->dev, "%s, Volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, dev_dbg(rtd->dev, "%s, volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, stream, NULL, 1, rtd->dai_link->id, &volume_info); if (ret < 0) { Loading Loading @@ -2575,11 +2576,14 @@ static int msm_asoc_pcm_new(struct snd_soc_pcm_runtime *rtd) return ret; } ret = msm_pcm_add_volume_control(rtd); ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_PLAYBACK); if (ret) pr_err("%s: Could not add pcm Volume Control %d\n", __func__, ret); ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_CAPTURE); if (ret) pr_err("%s: Could not add pcm Volume Control %d\n", __func__, ret); ret = msm_pcm_add_compress_control(rtd); if (ret) pr_err("%s: Could not add pcm Compress Control %d\n", Loading Loading
asoc/msm-pcm-q6-noirq.c +13 −8 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; pr_debug("%s\n", __func__); Loading @@ -687,7 +687,7 @@ 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; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; int volume = ucontrol->value.integer.value[0]; Loading @@ -708,15 +708,16 @@ static int msm_pcm_volume_ctl_put(struct snd_kcontrol *kcontrol, return rc; } static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd) static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd, int stream) { int ret = 0; struct snd_pcm *pcm = rtd->pcm; struct snd_pcm_volume *volume_info; struct snd_kcontrol *kctl; dev_dbg(rtd->dev, "%s, Volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, dev_dbg(rtd->dev, "%s, volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, stream, NULL, 1, rtd->dai_link->id, &volume_info); if (ret < 0) { Loading Loading @@ -1223,12 +1224,16 @@ static int msm_asoc_pcm_new(struct snd_soc_pcm_runtime *rtd) pr_err("%s: Could not add pcm Channel Map Control\n", __func__); ret = msm_pcm_add_volume_control(rtd); ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_PLAYBACK); if (ret) { pr_err("%s: Could not add pcm Volume Control %d\n", pr_err("%s: Could not add pcm playback volume Control %d\n", __func__, ret); } ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_CAPTURE); if (ret) { pr_err("%s: Could not add pcm capture volume Control %d\n", __func__, ret); } ret = msm_pcm_add_fe_topology_control(rtd); if (ret) { pr_err("%s: Could not add pcm topology control %d\n", Loading
asoc/msm-pcm-q6-v2.c +11 −7 Original line number Diff line number Diff line Loading @@ -1391,7 +1391,7 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_pcm_volume *vol = snd_kcontrol_chip(kcontrol); struct snd_pcm_substream *substream = vol->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; pr_debug("%s\n", __func__); Loading @@ -1415,7 +1415,7 @@ 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; vol->pcm->streams[vol->stream].substream; struct msm_audio *prtd; int volume = ucontrol->value.integer.value[0]; Loading @@ -1436,15 +1436,16 @@ static int msm_pcm_volume_ctl_put(struct snd_kcontrol *kcontrol, return rc; } static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd) static int msm_pcm_add_volume_control(struct snd_soc_pcm_runtime *rtd, int stream) { int ret = 0; struct snd_pcm *pcm = rtd->pcm; struct snd_pcm_volume *volume_info; struct snd_kcontrol *kctl; dev_dbg(rtd->dev, "%s, Volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, dev_dbg(rtd->dev, "%s, volume control add\n", __func__); ret = snd_pcm_add_volume_ctls(pcm, stream, NULL, 1, rtd->dai_link->id, &volume_info); if (ret < 0) { Loading Loading @@ -2575,11 +2576,14 @@ static int msm_asoc_pcm_new(struct snd_soc_pcm_runtime *rtd) return ret; } ret = msm_pcm_add_volume_control(rtd); ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_PLAYBACK); if (ret) pr_err("%s: Could not add pcm Volume Control %d\n", __func__, ret); ret = msm_pcm_add_volume_control(rtd, SNDRV_PCM_STREAM_CAPTURE); if (ret) pr_err("%s: Could not add pcm Volume Control %d\n", __func__, ret); ret = msm_pcm_add_compress_control(rtd); if (ret) pr_err("%s: Could not add pcm Compress Control %d\n", Loading