Skip to contentSkip to conversation

Why is ALSA sending STOP/START commands to my driver during MP3 playback?

DISCUSSION Timur Tabi 2 participants 2 messages Sep 7, 2007

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

I'm developing an ASoC driver, and when I play an MP3 with mpg123, my driver's trigger() function is called with the SNDRV_PCM_TRIGGER_STOP command and then is immediately called again with SNDRV_PCM_TRIGGER_START.

Can someone tell me why ALSA would do this?

This only happens when playing an MP3. When I use aplay to play a regular Wave file, I don't see this behavior.

My driver does not have the SNDRV_PCM_INFO_PAUSE bit set, because I haven't gotten around to testing that capability. I suspect that if I did have that bit set, I would be getting SNDRV_PCM_TRIGGER_PAUSE_PUSH and SNDRV_PCM_TRIGGER_PAUSE_RELEASE calls instead.

Signature · 2 lines
Timur Tabi
Linux Kernel Developer @ Freescale
#1 lore raw

At Fri, 07 Sep 2007 10:09:38 -0500,

Quoted 6 lines · Timur Tabi

I'm developing an ASoC driver, and when I play an MP3 with mpg123, my driver's trigger() function is called with the SNDRV_PCM_TRIGGER_STOP command and then is immediately called again with SNDRV_PCM_TRIGGER_START.

Can someone tell me why ALSA would do this?

I guess OSS-emulation code does this (automatic recovery from XRUN).

Takashi