All of lore.kernel.org
 help / color / mirror / Atom feed
* no_period_wakeup, axfer and --sched-model=timer
@ 2021-05-13 11:34 Amadeusz Sławiński
  2021-05-13 13:25 ` Takashi Sakamoto
  0 siblings, 1 reply; 6+ messages in thread
From: Amadeusz Sławiński @ 2021-05-13 11:34 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela, Takashi Sakamoto
  Cc: alsa-devel@alsa-project.org, Cezary Rojewski

Hi,

I was checking some stuff relater to NO_PERIOD_WAKEUP and noticed that 
axfer has support for using either --sched-model=irq or 
--sched-model=timer. However from few quick tests it seems like it 
doesn't work?

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0


When using  --sched-model=irq  it transfers data until I press Ctrl+C

$ axfer transfer playback --sched-model=irq -D hw:0,0 -r 48000 -c2 -f 
S16_LE /dev/urandom
PLAYBACK: Format 'Signed 16 bit Little Endian', Rate 48000 Hz, Channels 
'Stereo'
^CPLAYBACK: Expected 4611686018427387903frames, Actual 163960frames
Aborted by signal: Interrupt


However with  --sched-model=timer  it time outs by itself:

$ axfer transfer playback --sched-model=timer -D hw:0,0 -r 48000 -c2 -f 
S16_LE /dev/urandom
PLAYBACK: Format 'Signed 16 bit Little Endian', Rate 48000 Hz, Channels 
'Stereo'
Fail to process frames: Connection timed out
PLAYBACK: Expected 4611686018427387903frames, Actual 16304frames


How well is NO_PERIOD_WAKEUP tested/supported? Is it a bug in axfer or 
perhaps some issue in kernel code?

 From some debugging I did, I have my suspicions that it gets stuck on 
poll in:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/core/pcm_native.c?id=c06a2ba62fc401b7aaefd23f5d0bc06d2457ccc1#n3489
waiting for runtime->sleep to wake it, but seems like it never happens.

What do you think?

Amadeusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-13 14:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-13 11:34 no_period_wakeup, axfer and --sched-model=timer Amadeusz Sławiński
2021-05-13 13:25 ` Takashi Sakamoto
2021-05-13 13:37   ` Amadeusz Sławiński
2021-05-13 13:59     ` Takashi Sakamoto
2021-05-13 14:06       ` Amadeusz Sławiński
2021-05-13 14:10       ` Cezary Rojewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.