mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
asoc: tegra-alt: fix for repeat of offload stream
Do not send message to inactive state transition and flush. APM moves to inactive state on its own. Convert sample rate from index to value when sending to user. Bug 200082504 Change-Id: I9ee1c4a995940882e7cf163ab90fc59ffd0804df Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com> Reviewed-on: http://git-master/r/710381 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Holmes <sholmes@nvidia.com> Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
This commit is contained in:
committed by
Sameer Pujar
parent
469da04e35
commit
a26eb619f5
@@ -857,11 +857,6 @@ static int tegra210_adsp_compr_msg_handler(struct tegra210_adsp_app *app,
|
||||
dev_warn(prtd->dev, "EOS reached before drain");
|
||||
break;
|
||||
}
|
||||
tegra210_adsp_send_state_msg(prtd->fe_apm,
|
||||
nvfx_state_inactive,
|
||||
TEGRA210_ADSP_MSG_FLAG_SEND);
|
||||
tegra210_adsp_send_flush_msg(prtd->fe_apm,
|
||||
TEGRA210_ADSP_MSG_FLAG_SEND);
|
||||
snd_compr_drain_notify(prtd->cstream);
|
||||
prtd->is_draining = 0;
|
||||
}
|
||||
@@ -1055,7 +1050,6 @@ static int tegra210_adsp_compr_trigger(struct snd_compr_stream *cstream,
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
dev_err(prtd->dev, "Unsupported state.");
|
||||
return -EINVAL;
|
||||
@@ -1119,7 +1113,8 @@ static int tegra210_adsp_compr_pointer(struct snd_compr_stream *cstream,
|
||||
tstamp->pcm_frames = frames_played;
|
||||
/* TODO : calculate IO frames correctly */
|
||||
tstamp->pcm_io_frames = frames_played;
|
||||
tstamp->sampling_rate = prtd->codec.sample_rate;
|
||||
tstamp->sampling_rate =
|
||||
snd_pcm_rate_bit_to_rate(prtd->codec.sample_rate);
|
||||
|
||||
dev_vdbg(prtd->dev, "%s off %d copied %d pcm %d pcm io %d",
|
||||
__func__, (int)tstamp->byte_offset, (int)tstamp->copied_total,
|
||||
|
||||
Reference in New Issue
Block a user