Diff for /wikisrc/tutorials/how_to_use_5.1_surround_sound_with_netbsd.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/20 20:55:21 version 1.2, 2012/02/05 07:14:36
Line 1 Line 1
 **Contents**  **Contents**
   
 [[!toc levels=3]]  [[!toc levels=3]]
   
 #  System Requirements  #  System Requirements 
   
   * You will need a 5.1 Capable soundcard.    * You will need a 5.1 Capable soundcard. 
   * [NetBSD/i386](Hardware/i386) or [NetBSD/amd64](Hardware/amd64) 2.0 or higher    * [NetBSD/i386](Hardware/i386) or [NetBSD/amd64](Hardware/amd64) 2.0 or higher 
   * mplayer or xine software from pkgsrc.    * mplayer or xine software from pkgsrc. 
   
 #  Configuration  #  Configuration 
   
 The soundcard should have been automatically configured by the kernel. The audiolayer is configured by  The soundcard should have been automatically configured by the kernel. The audiolayer is configured by 
   
   * [audioctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?audioctl+1+NetBSD-current)    * [audioctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?audioctl+1+NetBSD-current)
   * [mixerctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?mixerctl+1+NetBSD-current)    * [mixerctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?mixerctl+1+NetBSD-current)
      
 ##  Syntax  ##  Syntax 
   
 The syntax of audioctl and mixerctl are the same.  The syntax of audioctl and mixerctl are the same. 
          
     % mixerctl      % mixerctl
     mixerctl [-d file] [-v] [-n] name ...      mixerctl [-d file] [-v] [-n] name ...
     mixerctl [-d file] [-v] [-n] -w name=value ...      mixerctl [-d file] [-v] [-n] -w name=value ...
     mixerctl [-d file] [-v] [-n] -a      mixerctl [-d file] [-v] [-n] -a
     %      %
          
   
 ##  Avaible command-line arguments  ##  Avaible command-line arguments 
   
 ##  audioctl  ##  audioctl 
          
     % audioctl -a      % audioctl -a
     name=VIA VT8233/8235      name=VIA VT8233/8235
     version=0x50      version=0x50
     config=auvia encodings=ulinear:8,mulaw:8*,alaw:8*,slinear:8*,slinear_le:16,ulinear_le:16*,slinear_be:16*,ulinear_be:16*      config=auvia encodings=ulinear:8,mulaw:8*,alaw:8*,slinear:8*,slinear_le:16,ulinear_le:16*,slinear_be:16*,ulinear_be:16* 
     properties=full_duplex,mmap,independent      properties=full_duplex,mmap,independent
     full_duplex=0      full_duplex=0
     fullduplex=0      fullduplex=0
     blocksize=16384      blocksize=16384
     hiwat=4      hiwat=4
     lowat=3      lowat=3
     monitor_gain=0      monitor_gain=0
     mode=play      mode=play
     play.rate=48000      play.rate=48000
     play.channels=4      play.channels=4
     play.precision=16      play.precision=16
     play.encoding=slinear_le      play.encoding=slinear_le
     play.gain=191      play.gain=191
     play.balance=32      play.balance=32
     play.port=0x0      play.port=0x0
     play.avail_ports=0x0      play.avail_ports=0x0
     play.seek=49152      play.seek=49152
     play.samples=254935040      play.samples=254935040
     play.eof=3509      play.eof=3509
     play.pause=0      play.pause=0
     play.error=1      play.error=1
     play.waiting=0      play.waiting=0
     play.open=1      play.open=1
     play.active=1      play.active=1
     play.buffer_size=65536      play.buffer_size=65536
     record.rate=48000      record.rate=48000
     record.channels=2      record.channels=2
     record.precision=16      record.precision=16
     record.encoding=slinear_le      record.encoding=slinear_le
     record.gain=0      record.gain=0
     record.balance=32      record.balance=32
     record.port=0x1      record.port=0x1
     record.avail_ports=0x7      record.avail_ports=0x7
     record.seek=0      record.seek=0
     record.samples=0      record.samples=0
     record.eof=0      record.eof=0
     record.pause=0      record.pause=0
     record.error=0      record.error=0
     record.waiting=0      record.waiting=0
     record.open=0      record.open=0
     record.active=0      record.active=0
     record.buffer_size=65536      record.buffer_size=65536
     record.errors=0      record.errors=0
     %      %
          
   
 ##  mixerctl  ##  mixerctl
          
     % mixerctl -a      % mixerctl -a
     outputs.master=191,191      outputs.master=191,191
     outputs.master.mute=off      outputs.master.mute=off
     outputs.mono=255      outputs.mono=255
     outputs.mono.mute=on      outputs.mono.mute=on
     outputs.mono.source=mixerout      outputs.mono.source=mixerout
     outputs.surround=255,255      outputs.surround=255,255
     outputs.surround.mute=off      outputs.surround.mute=off
     outputs.surround.lineinjack=on      outputs.surround.lineinjack=on
     outputs.surround.mixtofront=on      outputs.surround.mixtofront=on
     outputs.center=127      outputs.center=127
     outputs.center.mute=off      outputs.center.mute=off
     outputs.center.micjack=on      outputs.center.micjack=on
     outputs.center.mixtofront=on      outputs.center.mixtofront=on
     outputs.lfe=127      outputs.lfe=127
     outputs.lfe.mute=off      outputs.lfe.mute=off
     outputs.lfe.micjack=on      outputs.lfe.micjack=on
     outputs.lfe.mixtofront=on      outputs.lfe.mixtofront=on
     inputs.speaker=255      inputs.speaker=255
     inputs.speaker.mute=off      inputs.speaker.mute=off
     inputs.phone=191      inputs.phone=191
     inputs.phone.mute=on      inputs.phone.mute=on
     inputs.mic=191      inputs.mic=191
     inputs.mic.mute=on      inputs.mic.mute=on
     inputs.mic.preamp=off      inputs.mic.preamp=off
     inputs.mic.source=mic0      inputs.mic.source=mic0
     inputs.line=191,191      inputs.line=191,191
     inputs.line.mute=off      inputs.line.mute=off
     inputs.cd=191,191      inputs.cd=191,191
     inputs.cd.mute=off      inputs.cd.mute=off
     inputs.video=191,191      inputs.video=191,191
     inputs.video.mute=off      inputs.video.mute=off
     inputs.aux=191,191      inputs.aux=191,191
     inputs.aux.mute=off      inputs.aux.mute=off
     inputs.dac=151,151      inputs.dac=151,151
     inputs.dac.mute=off      inputs.dac.mute=off
     record.source=mic      record.source=mic
     record.volume=0,0      record.volume=0,0
     record.volume.mute=off      record.volume.mute=off
     outputs.spatial=off      outputs.spatial=off
     outputs.spatial.center=0      outputs.spatial.center=0
     outputs.spatial.depth=0      outputs.spatial.depth=0
     %      %
          
   
 ##  Required adjustments  ##  Required adjustments
   
 ##  Dolby Digital 4.1  ##  Dolby Digital 4.1
          
     % audioctl -w play.channels=4      % audioctl -w play.channels=4
     % mixerctl -w outputs.master=200,200      % mixerctl -w outputs.master=200,200
     % mixerctl -w outputs.surround.lineinjack=on      % mixerctl -w outputs.surround.lineinjack=on
     % mixerctl -w outputs.surround.mixtofront=on      % mixerctl -w outputs.surround.mixtofront=on
     % mixerctl -w outputs.surround=200,200      % mixerctl -w outputs.surround=200,200
          
   
 You should put this into your /etc/rc.conf  You should put this into your /etc/rc.conf 
   
 ##  Dolby Digital 5.1  ##  Dolby Digital 5.1
          
     % audioctl -w play.channels=6      % audioctl -w play.channels=6
     % mixerctl -w outputs.master=200,200      % mixerctl -w outputs.master=200,200 
     % mixerctl -w outputs.surround.lineinjack=on      % mixerctl -w outputs.surround.lineinjack=on
     % mixerctl -w outputs.surround.mixtofront=on      % mixerctl -w outputs.surround.mixtofront=on
     % mixerctl -w outputs.surround=200,200      % mixerctl -w outputs.surround=200,200
     % mixerctl -w outputs.center=200      % mixerctl -w outputs.center=200
     % mixerctl -w outputs.center.micjack=on      % mixerctl -w outputs.center.micjack=on
     % mixerctl -w outputs.center.mixtofront=on      % mixerctl -w outputs.center.mixtofront=on
     % mixerctl -w outputs.lfe=200      % mixerctl -w outputs.lfe=200
     % mixerctl -w outputs.lfe.micjack=on      % mixerctl -w outputs.lfe.micjack=on
     % mixerctl -w outputs.lfe.mixtofront=on      % mixerctl -w outputs.lfe.mixtofront=on
          
   
 You should put this also into your /etc/rc.conf  You should put this also into your /etc/rc.conf 
   
 #  Supported Players  #  Supported Players
   
 ##  Mplayer  ##  Mplayer
   
 Currently mplayer has the best surround sound support. For 4.1 run  Currently mplayer has the best surround sound support. For 4.1 run 
          
     mplayer -channels 4      mplayer -channels 4
          
   
 and for 5.1  and for 5.1 
          
     mplayer -channels 6      mplayer -channels 6
          
   
 ##  Xine  ##  Xine
   
 Unfortunately **mplayer** isn't able to handle DTS recorded DVD's. The required libdts (renamed due license restrictions to libdca) is not within the Packages Collection and if you believe several mailinglists it runs currently only on linux. But **xine** with the sun soundriver works fine. At first you have to make some adjustments, because the sound on DTS-DVD's is sampled at 24000 Hz and not 48000 Hz as a normal stereo DVD's.  Unfortunately **mplayer** isn't able to handle DTS recorded DVD's. The required libdts (renamed due license restrictions to libdca) is not within the Packages Collection and if you believe several mailinglists it runs currently only on linux. But **xine** with the sun soundriver works fine. At first you have to make some adjustments, because the sound on DTS-DVD's is sampled at 24000 Hz and not 48000 Hz as a normal stereo DVD's. 
          
     $ mixerctl -w outputs.surround.lineinjack=on      $ mixerctl -w outputs.surround.lineinjack=on
     $ mixerctl -w outputs.surround.mixtofront=on      $ mixerctl -w outputs.surround.mixtofront=on
     $ mixerctl -w outputs.master=200,200      $ mixerctl -w outputs.master=200,200
     $ mixerctl -w outputs.surround=200,200      $ mixerctl -w outputs.surround=200,200
     $ audioctl -w play.channels=4      $ audioctl -w play.channels=4
     $ audioctl -w play.rate=24000      $ audioctl -w play.rate=24000
          
   
 --[[Mc]] 14:38, 21 February 2006 (CET)  --[[Mc]] 14:38, 21 February 2006 (CET) 
   
 #  Additional Information  #  Additional Information 
   
   * [audioctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?audioctl+1+NetBSD-current) Manpage    * [audioctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?audioctl+1+NetBSD-current) Manpage 
   * [mixerctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?mixerctl+1+NetBSD-current) Manpage    * [mixerctl(1)](http://netbsd.gw.com/cgi-bin/man-cgi?mixerctl+1+NetBSD-current) Manpage 
   

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb