public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH 0/2] USB audio fixes
@ 2015-08-13 22:42 Pierre-Louis Bossart
  2015-08-13 22:42 ` [PATCH 1/2] ALSA: usb: fix corrupted pointers due to interface setting change Pierre-Louis Bossart
  2015-08-13 22:42 ` [PATCH 2/2] ALSA: usb: handle descriptor with SYNC_NONE illegal value Pierre-Louis Bossart
  0 siblings, 2 replies; 11+ messages in thread
From: Pierre-Louis Bossart @ 2015-08-13 22:42 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Pierre-Louis Bossart

While trying to understand how asynchronous endpoints are supported, I
identified two major issues. On my M-Audio transit, the following
script tries to play using the 3 different endpoints supported and
fails (error and no audio) after the first playback without the
patches. With the patches on top of 4.1.5 or Takashi's for-next
(4.2.0-rc5), I stopped the audio after an hour.

while true
do
    aplay -d5 -Dhw:2,0 ~/16_48.wav # play 48kHz, 16 bit on async ep
    aplay -d5 -Dhw:2,0 ~/24_48.wav # play 48kHz, 24 bit on 'none'/async ep
    aplay -d5 -Dhw:2,0 ~/24_96.wav # play 96 kHz, 24 bit on adaptive ep
    aplay -d5 -Dhw:2,0 ~/24_48.wav 
    aplay -d5 -Dhw:2,0 ~/16_48.wav
    aplay -d5 -Dhw:2,0 ~/24_96.wav
done

The first issue is pretty bad with corrupted pointers. When
transitioning from a alternate setting with a sync_endpoint to another
which doesn't have one by construction (synchronous, adaptive, async
on capture), the pointers are not reset and the code tries to set the
parameters of a non-existent endpoint.

The second issue is that the M-audio Transit descriptors are illegal
but the logic can be changed without harm.

I sometimes hear noise on playback start, probably the code needs to
be changed to add enough silent samples to let the PLL lock. I haven't
had time to work on this and this is more of an enhancement.

Comments welcome.

Pierre-Louis Bossart (2):
  ALSA: usb: fix corrupted pointers due to interface setting change
  ALSA: usb: handle descriptor with SYNC_NONE illegal value

 sound/usb/pcm.c | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2015-08-14 16:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13 22:42 [PATCH 0/2] USB audio fixes Pierre-Louis Bossart
2015-08-13 22:42 ` [PATCH 1/2] ALSA: usb: fix corrupted pointers due to interface setting change Pierre-Louis Bossart
2015-08-14 15:03   ` Takashi Iwai
2015-08-14 15:28     ` Takashi Iwai
2015-08-14 15:39       ` Pierre-Louis Bossart
2015-08-14 15:47         ` Takashi Iwai
2015-08-14 15:54           ` Takashi Iwai
2015-08-14 15:57   ` Takashi Iwai
2015-08-14 16:05     ` Pierre-Louis Bossart
2015-08-13 22:42 ` [PATCH 2/2] ALSA: usb: handle descriptor with SYNC_NONE illegal value Pierre-Louis Bossart
2015-08-14 16:03   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox