Loading asoc/msm-pcm-q6-noirq.c +14 −1 Original line number Original line Diff line number Diff line Loading @@ -600,13 +600,26 @@ static int msm_pcm_mmap(struct snd_pcm_substream *substream, static int msm_pcm_prepare(struct snd_pcm_substream *substream) static int msm_pcm_prepare(struct snd_pcm_substream *substream) { { int rc = 0; struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime; struct msm_audio *prtd = runtime->private_data; struct msm_audio *prtd = runtime->private_data; struct asm_softvolume_params softvol = { .period = SOFT_VOLUME_PERIOD, .step = SOFT_VOLUME_STEP, .rampingcurve = SOFT_VOLUME_CURVE_LINEAR, }; if (!prtd || !prtd->mmap_flag) if (!prtd || !prtd->mmap_flag) return -EIO; return -EIO; return 0; if (prtd->audio_client) { rc = q6asm_set_softvolume_v2(prtd->audio_client, &softvol, SOFT_VOLUME_INSTANCE_1); if (rc < 0) pr_err("%s: Send SoftVolume command failed rc=%d\n", __func__, rc); } return rc; } } static int msm_pcm_close(struct snd_pcm_substream *substream) static int msm_pcm_close(struct snd_pcm_substream *substream) Loading Loading
asoc/msm-pcm-q6-noirq.c +14 −1 Original line number Original line Diff line number Diff line Loading @@ -600,13 +600,26 @@ static int msm_pcm_mmap(struct snd_pcm_substream *substream, static int msm_pcm_prepare(struct snd_pcm_substream *substream) static int msm_pcm_prepare(struct snd_pcm_substream *substream) { { int rc = 0; struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime; struct msm_audio *prtd = runtime->private_data; struct msm_audio *prtd = runtime->private_data; struct asm_softvolume_params softvol = { .period = SOFT_VOLUME_PERIOD, .step = SOFT_VOLUME_STEP, .rampingcurve = SOFT_VOLUME_CURVE_LINEAR, }; if (!prtd || !prtd->mmap_flag) if (!prtd || !prtd->mmap_flag) return -EIO; return -EIO; return 0; if (prtd->audio_client) { rc = q6asm_set_softvolume_v2(prtd->audio_client, &softvol, SOFT_VOLUME_INSTANCE_1); if (rc < 0) pr_err("%s: Send SoftVolume command failed rc=%d\n", __func__, rc); } return rc; } } static int msm_pcm_close(struct snd_pcm_substream *substream) static int msm_pcm_close(struct snd_pcm_substream *substream) Loading