How to Use Alternate /dev/audio* Device?

2009-02-17 Thread Aaron Poffenberger
I've found that my USB harmon/kardon SoundSticks work with my x61. When 
I plug them in they're configured as /dev/audio1. The device works well. 
If I run `cat /dev/urandom  /dev/audio1` I hear static through the 
SoundSticks. I've also found that if I link /dev/audio to /dev/audio1 
rather than /dev/audio0 all sound plays through the SoundSticks as well. 
It's a workable hack.


I don't see any obvious configuration changes I can make using mixerctl 
that will direct audio to /dev/audio1. With aucat I can use -f to select 
the device but that doesn't help when using mplayer. Perhaps I don't 
understand how to use mixerctl or aucat correctly.


Will someone point me in the right direction to play audio system wide 
through /dev/audio1 rather than /dev/audio0?


Cheers,

Aaron

dmesg,  mixerctl -v  audioctl:

OpenBSD 4.4-current (GENERIC) #1667: Fri Jan 30 09:53:41 MST 2009
   t...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz (GenuineIntel 
686-class) 2 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR

real mem  = 3211005952 (3062MB)
avail mem = 3111215104 (2967MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/26/08, BIOS32 rev. 0 @ 0xfdc80, 
SMBIOS rev. 2.4 @ 0xe0010 (63 entries)

bios0: vendor LENOVO version 7NETB8WW (2.18 ) date 09/26/2008
bios0: LENOVO 76757KU
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT ASF! 
SSDT SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) DURT(S3) IGBE(S4) EXP0(S4) 
EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) 
USB3(S3) USB4(S3) EHC0(S3) EHC1(S3) HDEF(S4)

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 199MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus -1 (EXP2)
acpiprt5 at acpi0: bus -1 (EXP3)
acpiprt6 at acpi0: bus -1 (EXP4)
acpiprt7 at acpi0: bus 5 (PCI1)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpitz0 at acpi0: critical temperature 127 degC
acpitz1 at acpi0: critical temperature 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model 42T4506 serial  1825 type LION oem SANYO
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock at acpi0 not configured
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
bios0: ROM list: 0xc/0x1! 0xd/0x1000 0xd1000/0x1000 
0xd2000/0x3000! 0xe/0x1!

cpu0: unknown Enhanced SpeedStep CPU, msr 0x06120b2f06000b2f
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 2200 MHz (1452 mV): speeds: 2200, 1200 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel GM965 Host rev 0x0c
vga1 at pci0 dev 2 function 0 Intel GM965 Video rev 0x0c
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xe000, size 0x1000
inteldrm0 at vga1: apic 1 int 16 (irq 10)
drm0 at inteldrm0
Intel GM965 Video rev 0x0c at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 Intel ICH8 IGP M AMT rev 0x03: apic 1 
int 20 (irq 11), address 00:16:d3:c4:8e:a2
uhci0 at pci0 dev 26 function 0 Intel 82801H USB rev 0x03: apic 1 int 
20 (irq 11)
uhci1 at pci0 dev 26 function 1 Intel 82801H USB rev 0x03: apic 1 int 
21 (irq 11)
ehci0 at pci0 dev 26 function 7 Intel 82801H USB rev 0x03: apic 1 int 
22 (irq 11)

usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 Intel 82801H HD Audio rev 0x03: apic 
1 int 17 (irq 11)

azalia0: RIRB time out
azalia0: codecs: Analog Devices AD1984, Conexant/0x2bfa, using Analog 
Devices AD1984

audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801H PCIE rev 0x03: apic 1 int 
20 (irq 11)

pci1 at ppb0 bus 2
Intel Turbo Memory rev 0x01 at pci1 dev 0 function 0 not configured
ppb1 at pci0 dev 28 function 1 Intel 82801H PCIE rev 0x03: apic 1 int 
21 (irq 11)

pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 Intel Wireless WiFi Link 4965AGN rev 
0x61: apic 1 int 17 (irq 11), MIMO 2T3R, MoW1, address 00:13:e8:58:27:77
uhci2 at pci0 dev 29 function 0 Intel 82801H USB rev 0x03: apic 1 int 
16 (irq 10)
uhci3 at pci0 dev 29 function 1 Intel 82801H USB rev 0x03: apic 1 int 
17 (irq 11)
ehci1 at pci0 dev 29 function 7 Intel 82801H USB rev 0x03: apic 1 int 
19 (irq 11)

usb1 at ehci1: USB revision 2.0
uhub1 

Re: How to Use Alternate /dev/audio* Device?

2009-02-17 Thread Jacob Meuser
On Tue, Feb 17, 2009 at 07:12:24PM -0600, Aaron Poffenberger wrote:
 I've found that my USB harmon/kardon SoundSticks work with my x61. When  
 I plug them in they're configured as /dev/audio1. The device works well.  
 If I run `cat /dev/urandom  /dev/audio1` I hear static through the  
 SoundSticks. I've also found that if I link /dev/audio to /dev/audio1  
 rather than /dev/audio0 all sound plays through the SoundSticks as well.  
 It's a workable hack.

 I don't see any obvious configuration changes I can make using mixerctl  
 that will direct audio to /dev/audio1. With aucat I can use -f to select  
 the device but that doesn't help when using mplayer. Perhaps I don't  
 understand how to use mixerctl or aucat correctly.

 Will someone point me in the right direction to play audio system wide  
 through /dev/audio1 rather than /dev/audio0?

there are several device nodes for each real audio device: /dev/audioX,
/dev/soundX, /dev/audioctlX and /dev/mixerX.  there are corresponding
links for each of these: /dev/audio, /dev/sound, /dev/audioctl /dev/mixer.
by default, they all point to the first device (e.g. X == 0).  if you
change one, you should change them all.

I use a script like this:


#!/bin/sh

p=$1

ln -sf /dev/audio$p /dev/audio
ln -sf /dev/sound$p /dev/sound
ln -sf /dev/audioctl$p /dev/audioctl
ln -sf /dev/mixer$p /dev/mixer

exit 0


the first argument to the script is the audio device number.

alternatively, if you don't want to use your azalia(4) at all, you
could disable the azalia driver in UKC.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: How to Use Alternate /dev/audio* Device?

2009-02-17 Thread Aaron Poffenberger
Nice. Looks like my first attempt wasn't a total hack at all. Just an 
incomplete solution. :)


Thanks!

Jacob Meuser wrote:

On Tue, Feb 17, 2009 at 07:12:24PM -0600, Aaron Poffenberger wrote:
  
I've found that my USB harmon/kardon SoundSticks work with my x61. When  
I plug them in they're configured as /dev/audio1. The device works well.  
If I run `cat /dev/urandom  /dev/audio1` I hear static through the  
SoundSticks. I've also found that if I link /dev/audio to /dev/audio1  
rather than /dev/audio0 all sound plays through the SoundSticks as well.  
It's a workable hack.


I don't see any obvious configuration changes I can make using mixerctl  
that will direct audio to /dev/audio1. With aucat I can use -f to select  
the device but that doesn't help when using mplayer. Perhaps I don't  
understand how to use mixerctl or aucat correctly.


Will someone point me in the right direction to play audio system wide  
through /dev/audio1 rather than /dev/audio0?



there are several device nodes for each real audio device: /dev/audioX,
/dev/soundX, /dev/audioctlX and /dev/mixerX.  there are corresponding
links for each of these: /dev/audio, /dev/sound, /dev/audioctl /dev/mixer.
by default, they all point to the first device (e.g. X == 0).  if you
change one, you should change them all.

I use a script like this:


#!/bin/sh

p=$1

ln -sf /dev/audio$p /dev/audio
ln -sf /dev/sound$p /dev/sound
ln -sf /dev/audioctl$p /dev/audioctl
ln -sf /dev/mixer$p /dev/mixer

exit 0
  


the first argument to the script is the audio device number.

alternatively, if you don't want to use your azalia(4) at all, you
could disable the azalia driver in UKC.