Skip to contentSkip to conversation

ice1712, snd_pcm_mmap_readi(), POLLERR in poll_revents

DISCUSSION Peter Vollmer 2 participants 3 messages May 16, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,

I am still trying to get the ice1712-based soundcard to work on an embedded platform, using alsa driver/lib 0.9.3
While capturing works for hw:0,0 (multitrack mode) using snd_pcm_readi(), I get an -EIO when capturing with snd_pcm_mmap_readi(), immediatly after the buffer is filled up with 4 periods. I tracked the problem down to the snd_read_areas() function, where snd_pcm_wait(pcm,-1) returns -EIO (detection of POLLERR in revents), waiting for the soundcard to become ready.

Do you have any idea where to start debugging in the driver from this point ?

Thanks for your help,

Peter

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com

#1 lore raw

At Fri, 16 May 2003 16:03:48 +0200,

Quoted 11 lines · Peter Vollmer

Hi all,

I am still trying to get the ice1712-based soundcard to work on an embedded platform, using alsa driver/lib 0.9.3
While capturing works for hw:0,0 (multitrack mode) using snd_pcm_readi(), I get an -EIO when capturing with snd_pcm_mmap_readi(), immediatly after the buffer is filled up with 4 periods.
I tracked the problem down to the snd_read_areas() function, where snd_pcm_wait(pcm,-1) returns -EIO (detection of POLLERR in revents), waiting for the soundcard to become ready.

at first you should check in which state the pcm stream is when poll() returns the error. alsa-lib code checks the normal errors (XRUN and SUSPENDED) but the other status are handled as it is.

ciao,

Takashi

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com

#2 lore raw
Quoted 16 lines · Takashi Iwai

At Fri, 16 May 2003 16:03:48 +0200,

Quoted 4 lines · Peter Vollmer

Hi all,

I am still trying to get the ice1712-based soundcard to work on an

embedded

Quoted 2 lines

platform, using alsa driver/lib 0.9.3
While capturing works for hw:0,0 (multitrack mode) using

snd_pcm_readi(), I

Quoted 5 lines

get an -EIO when capturing with snd_pcm_mmap_readi(), immediatly after the buffer is filled up with 4 periods.
I tracked the problem down to the snd_read_areas() function, where snd_pcm_wait(pcm,-1) returns -EIO (detection of POLLERR in revents), waiting for the soundcard to become ready.

Quoted 3 lines

at first you should check in which state the pcm stream is when poll() returns the error. alsa-lib code checks the normal errors (XRUN and SUSPENDED) but the other status are handled as it is.

I checked this in the driver. Somehow the stream returned to OPEN state. In snd_pcm_capture_poll() the default case is applied. But the driver seems not to cause this, I checked all occurences of SNDRV_PCM_STATE_OPEN (in snd_pcm_open_substream(), snd_pcm_hw_params() and snd_pcm_hw_free(). If the state is only set using the enums SNDDRV_PCM_STATE_... , I guess I have a problem somewhere else.

Peter

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com