Lines Matching defs:alsa

37 #include <alsa/asoundlib.h>
44 #define AUDIO_CAP "alsa"
704 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
716 avail = alsa_get_avail (alsa->handle);
731 dst = advance (alsa->pcm_buf, rpos << hw->info.shift);
736 written = snd_pcm_writei (alsa->handle, dst, len);
747 if (alsa_recover (alsa->handle)) {
760 if (alsa_resume (alsa->handle)) {
798 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
801 alsa_anal_close (&alsa->handle);
803 if (alsa->pcm_buf) {
804 qemu_free (alsa->pcm_buf);
805 alsa->pcm_buf = NULL;
811 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
844 alsa->pcm_buf = audio_calloc (AUDIO_FUNC, obt.samples, 1 << hw->info.shift);
845 if (!alsa->pcm_buf) {
852 alsa->handle = handle;
880 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
885 return alsa_voice_ctl (alsa->handle, "playback", 0);
889 return alsa_voice_ctl (alsa->handle, "playback", 1);
897 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
930 alsa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
931 if (!alsa->pcm_buf) {
938 alsa->handle = handle;
944 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
946 alsa_anal_close (&alsa->handle);
948 if (alsa->pcm_buf) {
949 qemu_free (alsa->pcm_buf);
950 alsa->pcm_buf = NULL;
956 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
979 avail = alsa_get_avail (alsa->handle);
987 state = snd_pcm_state (alsa->handle);
994 if (alsa_resume (alsa->handle)) {
1035 src = advance (alsa->pcm_buf, bufs[i].add << hwshift);
1039 nread = snd_pcm_readi (alsa->handle, src, len);
1050 if (alsa_recover (alsa->handle)) {
1095 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
1100 return alsa_voice_ctl (alsa->handle, "capture", 0);
1104 return alsa_voice_ctl (alsa->handle, "capture", 1);
1183 INIT_FIELD (name = ) "alsa",
1184 INIT_FIELD (descr = ) "ALSA http://www.alsa-project.org",