DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th May 2009
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default qemu sound

I was wondering if anybody has any experience in using sound under Qemu
preferably on OpenBSD box. I tried installing LInux under Qemu and testing
sound under Linux but the system complains about missing /dev/dsp node on OpenBSD. Is there a way to point /dev/dsp to /dev/audio or to physical audio card. The card is by the way Sound Blaster Live supported by Qemu.
Reply With Quote
  #2   (View Single Post)  
Old 7th May 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Hi Oko,

QEMU_OSS_DAC_DEV and QEMU_OSS_ADC_DEV just happen to be /dev/dsp by default.. a common Linuxism.

Code:
$ qemu -audio-help
Audio options:
  QEMU_AUDIO_DAC_FIXED_SETTINGS: boolean, default = 1
    Use fixed settings for host DAC
  QEMU_AUDIO_DAC_FIXED_FREQ: integer, default = 44100
    Frequency for fixed host DAC
  QEMU_AUDIO_DAC_FIXED_FMT: format, default = S16, (one of: U8 S8 U16 S16)
    Format for fixed host DAC
  QEMU_AUDIO_DAC_FIXED_CHANNELS: integer, default = 2
    Number of channels for fixed DAC (1 - mono, 2 - stereo)
  QEMU_AUDIO_DAC_VOICES: integer, default = 1
    Number of voices for DAC
  QEMU_AUDIO_ADC_FIXED_SETTINGS: boolean, default = 1
    Use fixed settings for host ADC
  QEMU_AUDIO_ADC_FIXED_FREQ: integer, default = 44100
    Frequency for fixed host ADC
  QEMU_AUDIO_ADC_FIXED_FMT: format, default = S16, (one of: U8 S8 U16 S16)
    Format for fixed host ADC
  QEMU_AUDIO_ADC_FIXED_CHANNELS: integer, default = 2
    Number of channels for fixed ADC (1 - mono, 2 - stereo)
  QEMU_AUDIO_ADC_VOICES: integer, default = 1
    Number of voices for ADC
  QEMU_AUDIO_TIMER_PERIOD: integer, default = 0
    Timer period in HZ (0 - use lowest possible)
  QEMU_AUDIO_PLIVE: boolean, default = 0
    (undocumented)
  QEMU_AUDIO_LOG_TO_MONITOR: boolean, default = 0
    print logging messages to montior instead of stderr

Available drivers:
Name: oss
Description: OSS http://www.opensound.com
Theoretically supports many playback voices
Theoretically supports many capture voices
Options:
  QEMU_OSS_FRAGSIZE: integer, default = 4096
    Fragment size in bytes
  QEMU_OSS_NFRAGS: integer, default = 4
    Number of fragments
  QEMU_OSS_MMAP: boolean, default = 0
    Try using memory mapped access
  QEMU_OSS_DAC_DEV: string, default = /dev/dsp
    Path to DAC device
  QEMU_OSS_ADC_DEV: string, default = /dev/dsp
    Path to ADC device
  QEMU_OSS_DEBUG: boolean, default = 0
    Turn on some debugging messages

Name: sdl
Description: SDL http://www.libsdl.org
One playback voice
Does not support capture
Options:
  QEMU_SDL_SAMPLES: integer, default = 1024
    Size of SDL buffer in samples

Name: none
Description: Timer based audio emulation
Theoretically supports many playback voices
Theoretically supports many capture voices
No options

Name: wav
Description: WAV renderer http://wikipedia.org/wiki/WAV
One playback voice
Does not support capture
Options:
  QEMU_WAV_FREQUENCY: integer, default = 44100
    Frequency
  QEMU_WAV_FORMAT: format, default = S16, (one of: U8 S8 U16 S16)
    Format
  QEMU_WAV_DAC_FIXED_CHANNELS: integer, default = 2
    Number of channels (1 - mono, 2 - stereo)
  QEMU_WAV_PATH: string, default = qemu.wav
    Path to wave file

Options are settable through environment variables.
Example:
  export QEMU_AUDIO_DRV=wav
  export QEMU_WAV_PATH=$HOME/tune.wav
(for csh replace export with setenv in the above)
  qemu ...
So you can either export QEMU_AUDIO_DRV=sdl or export QEMU_OSS_{ADC,DAC}_DEV=/dev/audio.

Hope that helps.
Reply With Quote
  #3   (View Single Post)  
Old 7th May 2009
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

It worked as charm. Thank you. I had something similar in my ~/.profile but I made some syntax mistakes.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording sound with external sound card backrow OpenBSD General 5 21st August 2009 08:17 PM
qemu & kqemu adamk FreeBSD General 10 9th October 2008 03:27 PM
Jailed QEMU + other OS revzalot FreeBSD Installation and Upgrading 3 29th May 2008 06:00 PM
ssh to FreeBSD run in Qemu mfaridi FreeBSD Security 11 19th May 2008 01:00 PM


All times are GMT. The time now is 07:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick