Home | History | Annotate | Download | only in audio

Lines Matching full:oss

2  * QEMU OSS audio driver
36 #define AUDIO_CAP "oss"
293 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
309 if (oss->mmapped) {
312 err = ioctl (oss->fd, SNDCTL_DSP_GETOPTR, &cntinfo);
318 if (cntinfo.ptr == oss->old_optr) {
325 if (cntinfo.ptr > oss->old_optr) {
326 bytes = cntinfo.ptr - oss->old_optr;
329 bytes = bufsize + cntinfo.ptr - oss->old_optr;
335 err = ioctl (oss->fd, SNDCTL_DSP_GETOSPACE, &abinfo);
371 dst = advance (oss->pcm_buf, rpos << hw->info.shift);
374 if (!oss->mmapped) {
377 written = write (oss->fd, dst, convert_samples << hw->info.shift);
406 if (oss->mmapped) {
407 oss->old_optr = cntinfo.ptr;
417 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
420 oss_anal_close (&oss->fd);
422 if (oss->pcm_buf) {
423 if (oss->mmapped) {
424 err = munmap (oss->pcm_buf, hw->samples << hw->info.shift);
427 oss->pcm_buf, hw->samples << hw->info.shift);
431 qemu_free (oss->pcm_buf);
433 oss->pcm_buf = NULL;
439 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
447 oss->fd = -1;
471 oss->nfrags = obt.nfrags;
472 oss->fragsize = obt.fragsize;
481 oss->mmapped = 0;
483 oss->pcm_buf = mmap (
491 if (oss->pcm_buf == MAP_FAILED) {
509 oss->mmapped = 1;
513 if (!oss->mmapped) {
514 err = munmap (oss->pcm_buf, hw->samples << hw->info.shift);
517 oss->pcm_buf, hw->samples << hw->info.shift);
523 if (!oss->mmapped) {
524 oss->pcm_buf = audio_calloc (
529 if (!oss->pcm_buf) {
540 oss->fd = fd;
547 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
549 if (!oss->mmapped) {
556 audio_pcm_info_clear_buf (&hw->info, oss->pcm_buf, hw->samples);
558 if (ioctl (oss->fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) {
570 if (ioctl (oss->fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) {
581 OSSVoiceIn *oss = (OSSVoiceIn *) hw;
589 oss->fd = -1;
612 oss->nfrags = obt.nfrags;
613 oss->fragsize = obt.fragsize;
621 oss
622 if (!oss->pcm_buf) {
629 oss->fd = fd;
635 OSSVoiceIn *oss = (OSSVoiceIn *) hw;
637 oss_anal_close (&oss->fd);
639 if (oss->pcm_buf) {
640 qemu_free (oss->pcm_buf);
641 oss->pcm_buf = NULL;
647 OSSVoiceIn *oss = (OSSVoiceIn *) hw;
678 void *p = advance (oss->pcm_buf, bufs[i].add << hwshift);
679 nread = read (oss->fd, p, bufs[i].len);
769 INIT_FIELD (name = ) "oss",
770 INIT_FIELD (descr = ) "OSS audio (www.opensound.com)",