Skip to content

Commit

Permalink
Revert "delay debugging"
Browse files Browse the repository at this point in the history
This reverts commit a1994f3.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
  • Loading branch information
ujfalusi committed May 8, 2024
1 parent 1e84c05 commit b3fcc2c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions sound/soc/sof/intel/hda-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ snd_pcm_uframes_t hda_dsp_pcm_pointer(struct snd_sof_dev *sdev,
pos = bytes_to_frames(substream->runtime, pos);

trace_sof_intel_hda_dsp_pcm(sdev, hstream, substream, pos);
if (substream->stream != SNDRV_PCM_STREAM_CAPTURE)
pr_warn("[peter] | hda pointer: %lu\n", pos);
return pos;
}
EXPORT_SYMBOL_NS(hda_dsp_pcm_pointer, SND_SOC_SOF_INTEL_HDA_COMMON);
Expand Down
20 changes: 0 additions & 20 deletions sound/soc/sof/ipc4-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ static int sof_ipc4_trigger_pipelines(struct snd_soc_component *component,
static int sof_ipc4_pcm_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd)
{
u64 tmp_cnt;
int state;

/* determine the pipeline state */
Expand All @@ -534,19 +533,11 @@ static int sof_ipc4_pcm_trigger(struct snd_soc_component *component,
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_START:
state = SOF_IPC4_PIPE_RUNNING;
pr_warn("[peter] | trigger: RELEASE\n");
tmp_cnt = snd_sof_pcm_get_dai_frame_counter(snd_soc_component_get_drvdata(component),
component, substream);
pr_warn("[peter] | trigger: RELEASE (%llu)\n", tmp_cnt);
break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_STOP:
state = SOF_IPC4_PIPE_PAUSED;
pr_warn("[peter] | trigger: PAUSE\n");
tmp_cnt = snd_sof_pcm_get_dai_frame_counter(snd_soc_component_get_drvdata(component),
component, substream);
pr_warn("[peter] | trigger: PAUSE (%llu)\n", tmp_cnt);
break;
default:
dev_err(component->dev, "%s: unhandled trigger cmd %d\n", __func__, cmd);
Expand Down Expand Up @@ -975,7 +966,6 @@ static int sof_ipc4_pcm_pointer(struct snd_soc_component *component,
struct snd_sof_pcm_stream *sps;
u64 dai_cnt, host_cnt, host_ptr;
struct snd_sof_pcm *spcm;
u64 tmp_cnt;
int ret;

spcm = snd_sof_find_spcm_dai(component, rtd);
Expand Down Expand Up @@ -1018,7 +1008,6 @@ static int sof_ipc4_pcm_pointer(struct snd_soc_component *component,
sof_mailbox_read(sdev, time_info->llp_offset, &llp, sizeof(llp));
dai_cnt = ((u64)llp.reading.llp_u << 32) | llp.reading.llp_l;
}
tmp_cnt = dai_cnt;
dai_cnt += time_info->stream_end_offset;

/* In two cases dai dma counter is not accurate
Expand Down Expand Up @@ -1064,18 +1053,10 @@ static int sof_ipc4_pcm_pointer(struct snd_soc_component *component,
}

if (head_cnt < tail_cnt) {
pr_warn("[peter] | offset: %llu / %llu, tail_cnt: %lu (%llu), head_cnt: %lu, delay: %lu (OhNooo)\n",
time_info->stream_start_offset, time_info->stream_end_offset,
tail_cnt, tmp_cnt, head_cnt,
substream->runtime->boundary - tail_cnt + head_cnt);
time_info->delay = time_info->boundary - tail_cnt + head_cnt;
goto out;
}

pr_warn("[peter] | offset: %llu / %llu, tail_cnt: %lu (%llu), head_cnt: %lu, delay: %lu\n",
time_info->stream_start_offset, time_info->stream_end_offset,
tail_cnt, tmp_cnt, head_cnt, head_cnt - tail_cnt);

time_info->delay = head_cnt - tail_cnt;

out:
Expand All @@ -1086,7 +1067,6 @@ static int sof_ipc4_pcm_pointer(struct snd_soc_component *component,
div64_u64_rem(host_ptr, snd_pcm_lib_buffer_bytes(substream), &host_ptr);
*pointer = bytes_to_frames(substream->runtime, host_ptr);

pr_warn("[peter] | ldp pointer: %lu\n", *pointer);
return 0;
}

Expand Down

0 comments on commit b3fcc2c

Please sign in to comment.