mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
asoc: Add digital mute callback function for cdc dma
Add a new digital mute callback function for cdc dma as it uses a different dai structure. Change-Id: I8db4e9610aee0d519ccc50975a779b9d2d8c671e Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:
parent
4bef843da5
commit
f03085692d
1 changed files with 16 additions and 3 deletions
|
|
@ -2795,7 +2795,6 @@ static int msm_dai_q6_set_channel_map(struct snd_soc_dai *dai,
|
|||
return rc;
|
||||
}
|
||||
|
||||
/* all ports with excursion logging requirement can use this digital_mute api */
|
||||
static int msm_dai_q6_spk_digital_mute(struct snd_soc_dai *dai,
|
||||
int mute)
|
||||
{
|
||||
|
|
@ -12357,7 +12356,8 @@ static int msm_dai_q6_cdc_dma_prepare(struct snd_pcm_substream *substream,
|
|||
static void msm_dai_q6_cdc_dma_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct msm_dai_q6_dai_data *dai_data = dev_get_drvdata(dai->dev);
|
||||
struct msm_dai_q6_cdc_dma_dai_data *dai_data =
|
||||
dev_get_drvdata(dai->dev);
|
||||
int rc = 0;
|
||||
|
||||
if (test_bit(STATUS_PORT_STARTED, dai_data->status_mask)) {
|
||||
|
|
@ -12376,6 +12376,19 @@ static void msm_dai_q6_cdc_dma_shutdown(struct snd_pcm_substream *substream,
|
|||
clear_bit(STATUS_PORT_STARTED, dai_data->hwfree_status);
|
||||
}
|
||||
|
||||
static int msm_dai_q6_cdc_dma_digital_mute(struct snd_soc_dai *dai,
|
||||
int mute)
|
||||
{
|
||||
int port_id = dai->id;
|
||||
struct msm_dai_q6_cdc_dma_dai_data *dai_data =
|
||||
dev_get_drvdata(dai->dev);
|
||||
|
||||
if (mute && !dai_data->xt_logging_disable)
|
||||
afe_get_sp_xt_logging_data(port_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops msm_dai_q6_cdc_dma_ops = {
|
||||
.prepare = msm_dai_q6_cdc_dma_prepare,
|
||||
.hw_params = msm_dai_q6_cdc_dma_hw_params,
|
||||
|
|
@ -12388,7 +12401,7 @@ static struct snd_soc_dai_ops msm_dai_q6_cdc_wsa_dma_ops = {
|
|||
.hw_params = msm_dai_q6_cdc_dma_hw_params,
|
||||
.shutdown = msm_dai_q6_cdc_dma_shutdown,
|
||||
.set_channel_map = msm_dai_q6_cdc_dma_set_channel_map,
|
||||
.digital_mute = msm_dai_q6_spk_digital_mute,
|
||||
.digital_mute = msm_dai_q6_cdc_dma_digital_mute,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver msm_dai_q6_cdc_dma_dai[] = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue