aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2023-01-19 11:05:24 +0000
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2023-01-24 12:10:20 +0530
commitd94a120d0ab804ff84f49f3bcbd4b61e68b628a6 (patch)
tree1c5d08d32bce1a47b2c13058cd71b08aa0e161e9
parent41c7b3f0108b5127bf5b18949b23ae2de00ba4ef (diff)
DEBUG: ASoC: q6dsp: add debug to track down multiple prepare issue
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r--sound/soc/qcom/qdsp6/q6apm-dai.c6
-rw-r--r--sound/soc/qcom/qdsp6/q6apm-lpass-dais.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index ee59ef36b85a..7b844bf92118 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -53,6 +53,7 @@ struct q6apm_dai_rtd {
uint16_t session_id;
enum stream_state state;
struct q6apm_graph *graph;
+ int graph_id;
};
struct q6apm_dai_data {
@@ -133,6 +134,7 @@ static int q6apm_dai_prepare(struct snd_soc_component *component,
struct q6apm_dai_data *pdata;
int ret;
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, prtd->graph_id);
pdata = snd_soc_component_get_drvdata(component);
if (!pdata)
return -EINVAL;
@@ -253,6 +255,8 @@ static int q6apm_dai_open(struct snd_soc_component *component,
if (prtd == NULL)
return -ENOMEM;
+ prtd->graph_id = graph_id;
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, prtd->graph_id);
prtd->substream = substream;
prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler, prtd, graph_id);
if (IS_ERR(prtd->graph)) {
@@ -314,6 +318,7 @@ static int q6apm_dai_close(struct snd_soc_component *component,
struct snd_pcm_runtime *runtime = substream->runtime;
struct q6apm_dai_rtd *prtd = runtime->private_data;
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, prtd->graph_id);
if (prtd->state) { /* only stop graph that is started */
q6apm_graph_stop(prtd->graph);
q6apm_unmap_memory_regions(prtd->graph, substream->stream);
@@ -345,6 +350,7 @@ static int q6apm_dai_hw_params(struct snd_soc_component *component,
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct q6apm_dai_rtd *prtd = runtime->private_data;
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, prtd->graph_id);
prtd->pcm_size = params_buffer_bytes(params);
prtd->periods = params_periods(params);
diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
index 23d23bc6fbaa..e5358a3ae516 100644
--- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
+++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
@@ -97,6 +97,7 @@ static int q6dma_hw_params(struct snd_pcm_substream *substream,
struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
struct audioreach_module_config *cfg = &dai_data->module_config[dai->id];
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, dai->id);
cfg->bit_width = params_width(params);
cfg->sample_rate = params_rate(params);
cfg->num_channels = params_channels(params);
@@ -108,6 +109,7 @@ static void q6apm_lpass_dai_shutdown(struct snd_pcm_substream *substream, struct
{
struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
int rc;
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, dai->id);
if (!dai_data->is_port_started[dai->id])
return;
@@ -127,6 +129,8 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct s
int graph_id = dai->id;
int rc;
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, dai->id);
+
if (dai_data->is_port_started[dai->id]) {
q6apm_graph_stop(dai_data->graph[dai->id]);
dai_data->is_port_started[dai->id] = false;
@@ -176,6 +180,7 @@ static int q6apm_lpass_dai_startup(struct snd_pcm_substream *substream, struct s
struct q6apm_graph *graph;
int graph_id = dai->id;
+ pr_err("GRAPHDEBUG: %s: %d\n", __func__, dai->id);
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
graph = q6apm_graph_open(dai->dev, NULL, dai->dev, graph_id);
if (IS_ERR(graph)) {