Hi,
I'm still trying to grok alsa, and now I have the following problem:
I'm using snd_pcm_writei to playback some audio, however, after a
little time the call fails with the error: "File descriptor in bad
state", which I believe I cannot recover from.
Why does this happen, and what could I do about this?
cat /proc/asound/card0/pcm0p/sub0/* prints the following stuff, I
don't know whether this is helpful?
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 8192
buffer_size: 16384
tick_time: 1000
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: VIA 8235
name: VIA 8235
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 4
subdevices_avail: 3
64
state: RUNNING
trigger_time: 1143205215.076663000
tstamp : 1143205216.323831000
delay : 13856
avail : 2528
avail_max : 14368
-----
hw_ptr : 59872
appl_ptr : 73728
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 8192
xfer_align: 8192
start_threshold: 1
stop_threshold: 16384
silence_threshold: 0
silence_size: 0
boundary: 1073741824