[alsa-devel] [PATCH 0/2] ALSA: pcm: trace selection process of hardware parameters

Takashi Sakamoto o-takashi at sakamocchi.jp
Fri Jun 9 14:46:47 CEST 2017


Hi,

This patchset is a revised version of my former RFC.

[alsa-devel] [PATCH RFC 00/21] ALSA: pcm: add tracepoints for PCM params operation
http://mailman.alsa-project.org/pipermail/alsa-devel/2017-May/120548.html

Unlike SNDRV_PCM_IOCTL_HW_REFINE, returned data from invocation of
ioctl(2) with SNDRV_PCM_IOCTL_HW_PARAMS includes single value for below
parameters:

 * SNDRV_PCM_HW_PARAM_ACCESS
 * SNDRV_PCM_HW_PARAM_FORMAT
 * SNDRV_PCM_HW_PARAM_SUBFORMAT
 * SNDRV_PCM_HW_PARAM_CHANNELS
 * SNDRV_PCM_HW_PARAM_RATE
 * SNDRV_PCM_HW_PARAM_PERIOD_TIME
 * SNDRV_PCM_HW_PARAM_BUFFER_SIZE
 * SNDRV_PCM_HW_PARAM_TICK_TIME

This is an additional selection process of hardware parameters in service
routine of the command.

This patchset adds tracepoint events to probe the selection process so
that developers can realize final set of parameters by tracing data.

Below is a sample. The first three entries are final applications of
constraint rules. The rest is newly added by this patchset.

$ trace-cmd report
...
hw_interval_param: pcmC0D0p 021/023 PERIOD_SIZE 0 1 [1000 1000] 0 1 [1000 1000]
hw_interval_param: pcmC0D0p 022/023 BUFFER_BYTES 0 1 [8000 8000] 0 1 [8000 8000]
hw_interval_param: pcmC0D0p 023/023 RATE 0 1 [8000 8000] 0 1 [8000 8000]
hw_mask_param:     pcmC0D0p 000/023 ACCESS 00000000000000000000000000000001 00000000000000000000000000000001
hw_mask_param:     pcmC0D0p 000/023 FORMAT 00000000000000000000000000000004 00000000000000000000000000000004
hw_mask_param:     pcmC0D0p 000/023 SUBFORMAT 00000000000000000000000000000001 00000000000000000000000000000001
hw_interval_param: pcmC0D0p 000/023 CHANNELS 0 1 [1 1] 0 1 [1 1]
hw_interval_param: pcmC0D0p 000/023 RATE 0 1 [8000 8000] 0 1 [8000 8000]
hw_interval_param: pcmC0D0p 000/023 PERIOD_TIME 0 1 [125000 125000] 0 1 [125000 125000]
hw_interval_param: pcmC0D0p 000/023 BUFFER_SIZE 0 1 [4000 4000] 0 1 [4000 4000]
hw_interval_param: pcmC0D0p 000/023 TICK_TIME 0 1 [0 0] 0 1 [0 0]

Takashi Sakamoto (3):
  ALSA: pcm: localize snd_pcm_hw_params_choose()
  ALSA: pcm: add tracepoints for final selection process of hardware
    parameters
  ALSA: pcm: use friendly name for id of PCM substream in trace print

 sound/core/pcm_lib.c         | 40 ----------------------------
 sound/core/pcm_local.h       |  3 ---
 sound/core/pcm_native.c      | 62 ++++++++++++++++++++++++++++++++++++++++++++
 sound/core/pcm_param_trace.h |  8 +++---
 4 files changed, 66 insertions(+), 47 deletions(-)

-- 
2.11.0



More information about the Alsa-devel mailing list