Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36c7c797 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: Add digital mute callback function for cdc dma"

parents 7d82a420 8010a7d6
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -2811,7 +2811,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)
{
@@ -12465,7 +12464,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)) {
@@ -12484,6 +12484,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,
@@ -12496,7 +12509,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[] = {