Home | History | Annotate | Download | only in audio

Lines Matching refs:alsa

2  * QEMU ALSA audio driver
25 #include <alsa/asoundlib.h>
29 #define AUDIO_CAP "alsa"
600 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
612 avail = alsa_get_avail (alsa->handle);
627 dst = advance (alsa->pcm_buf, rpos << hw->info.shift);
632 written = FF(snd_pcm_writei) (alsa->handle, dst, len);
643 if (alsa_recover (alsa->handle)) {
678 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
681 alsa_anal_close (&alsa->handle);
683 if (alsa->pcm_buf) {
684 qemu_free (alsa->pcm_buf);
685 alsa->pcm_buf = NULL;
691 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
698 /* shut alsa debug spew */
723 alsa->pcm_buf = audio_calloc (AUDIO_FUNC, obt.samples, 1 << hw->info.shift);
724 if (!alsa->pcm_buf) {
731 alsa->handle = handle;
765 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
770 return alsa_voice_ctl (alsa->handle, "playback", 0);
774 return alsa_voice_ctl (alsa->handle, "playback", 1);
782 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
789 /* shut alsa debug spew */
814 alsa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
815 if (!alsa->pcm_buf) {
822 alsa->handle = handle;
834 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
836 alsa_anal_close (&alsa->handle);
838 if (alsa->pcm_buf) {
839 qemu_free (alsa->pcm_buf);
840 alsa->pcm_buf = NULL;
846 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
866 avail = alsa_get_avail (alsa->handle);
872 if (!avail && (FF(snd_pcm_state) (alsa->handle) == SND_PCM_STATE_PREPARED)) {
897 src = advance (alsa->pcm_buf, bufs[i].add << hwshift);
901 nread = FF(snd_pcm_readi) (alsa->handle, src, len);
912 if (alsa_recover (alsa->handle)) {
957 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
962 return alsa_voice_ctl (alsa->handle, "capture", 0);
966 return alsa_voice_ctl (alsa->handle, "capture", 1);
1057 INIT_FIELD (name = ) "alsa",
1058 INIT_FIELD (descr = ) "ALSA audio (www.alsa-project.org)",