-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASoC: SOF: ipc4-topology: Add deep buffer size to the debug message #4544
ASoC: SOF: ipc4-topology: Add deep buffer size to the debug message #4544
Conversation
sound/soc/sof/ipc4-topology.c
Outdated
dev_dbg(sdev->dev, "copier %s, IPC size is %d, deep buffer size %u", swidget->widget->name, | ||
ipc_size, copier_data->gtw_cfg.dma_buffer_size); | ||
else | ||
dev_dbg(sdev->dev, "copier %s, IPC size is %d", swidget->widget->name, ipc_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, we can always print the dma buffer size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, I was inquired several times about how to tell the current deep buff size when experimenting different DEEPBUFFER_FW_DMA_MS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the deepbuffer is only affecting swidget->id == snd_soc_dapm_aif_in
, in other copiers and w/o DB the buffer size is 2ms worth of bytes.
The question is: what is important? The buffer size in bytes or the length in time? A printing around 1729 if deep_buffer_dma_ms is set might be enough?
Or print only for the host copiers unconditionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deep_buffer_dma_ms is more clear as an indicator, is the following acceptable?
unconditionally for snd_soc_dapm_aif_in:
[ 93.872063] sof-audio-pci-intel-mtl 0000:00:1f.3: copier host-copier.1.playback, deep_buffer_dma_ms 0, dma_buffer_size 384
When deepbuf is used:
[ 156.859504] sof-audio-pci-intel-mtl 0000:00:1f.3: copier host-copier.31.playback, deep_buffer_dma_ms 10, dma_buffer_size 1920
e57dd7c
to
280603f
Compare
V2:
|
sound/soc/sof/ipc4-topology.c
Outdated
max((u32)SOF_IPC4_MIN_DMA_BUFFER_SIZE, deep_buffer_dma_ms) * | ||
copier_data->base_config.ibs; | ||
dev_dbg(sdev->dev, "copier %s, deep_buffer_dma_ms %u, dma_buffer_size %u", | ||
swidget->widget->name, deep_buffer_dma_ms, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use the max((u32)SOF_IPC4_MIN_DMA_BUFFER_SIZE, deep_buffer_dma_ms) otherwise the log could be questionable with values that don't really make sense with regular ms to byte conversions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, let me update in next version, thanks for the review!!
280603f
to
ff51e02
Compare
V3: Print max((u32)SOF_IPC4_MIN_DMA_BUFFER_SIZE, deep_buffer_dma_ms) instead of deep_buffer_dma_ms:
I am OK to print the buffer info conditionally for (deep_buffer_dma_ms > 0) case only if above looks bit verbose/confusing. |
ff51e02
to
21de9be
Compare
Print deep_buffer_dma_ms and dma_buffer_size for debug purpose. Signed-off-by: Yong Zhi <[email protected]>
21de9be
to
129f6df
Compare
When deep buffer is used, print the dma size for debug.