Re: Change default audiodevice in OpenBSD-current
Johan Svensson wrote: I am trying to change my default output device from my builtin soundcard to an usb soundcard which is an output only device. I have tried: # audioctl -f /dev/audio1 audioctl: /dev/audio1: Device not configured It seems this device does not exist from the kernel's point of view. (there's also /dev/audioctl1, but using that probably doesn't make a difference) I think there should be some controller that you configuring the audio device. But i manually tried to change the symlinks in the dev directory: # ls -la * | grep -E mixer|audio lrwxr-xr-x 1 root wheel6 Jun 3 16:58 audio - audio1 crw-rw-rw- 1 root wheel 42, 128 Jun 3 17:01 audio0 crw-rw-rw- 1 root wheel 42, 129 May 28 19:07 audio1 crw-rw-rw- 1 root wheel 42, 130 May 28 19:07 audio2 lrwxr-xr-x 1 root wheel9 Jun 3 16:58 audioctl - audioctl1 crw-rw-rw- 1 root wheel 42, 192 May 28 19:07 audioctl0 crw-rw-rw- 1 root wheel 42, 193 May 28 19:07 audioctl1 crw-rw-rw- 1 root wheel 42, 194 May 28 19:07 audioctl2 lrwxr-xr-x 1 root wheel6 Jun 3 16:58 mixer - mixer1 crw-rw-rw- 1 root wheel 42, 16 May 28 19:07 mixer0 crw-rw-rw- 1 root wheel 42, 17 May 28 19:07 mixer1 crw-rw-rw- 1 root wheel 42, 18 May 28 19:07 mixer2 But it is still defaulting to my builtin soundcard. How can i change the default sounddevice from audio0 to audio1? I think using sndiod(1) is the answer, in the most simplistic form, something like this in your rc.conf.local(8) should suffice: sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default This should make your audio0 device available as snd/0.onboard and your audio1 device as the default sound device. (Both should be available as snd/0 and snd/1 respectively as well IIRC). /Regards Johan Svensson DMESG: dmesg | grep audio audio0 at azalia0 audio0 at azalia0 audio0 at azalia0 audio0 at azalia0 uaudio0 at uhub2 port 1 configuration 1 interface 1 NuForce, Inc. NuForce \M-5DAC 2 rev 1.10/0.01 addr 3 uaudio0: ignored setting with type 8193 format If I'm correct format 8193 (== 0x2001) means IEC1937 AC-3. This is an encoded format. AFAICT the uaudio driver only supports plain PCM formats. (unencoded audio samples) Do you know if your device only supports AC-3 inputs or can it also handle PCM signals ? (running 'lsusb -v', from the usbutils package, on the device should give a good clue what your device supports) uaudio0: audio rev 1.00, 2 mixer controls audio1 at uaudio0
Re: Change default audiodevice in OpenBSD-current
On 06/03/14 18:22, Remco wrote: Johan Svensson wrote: I am trying to change my default output device from my builtin soundcard to an usb soundcard which is an output only device. I have tried: # audioctl -f /dev/audio1 audioctl: /dev/audio1: Device not configured It seems this device does not exist from the kernel's point of view. (there's also /dev/audioctl1, but using that probably doesn't make a difference) I think there should be some controller that you configuring the audio device. But i manually tried to change the symlinks in the dev directory: # ls -la * | grep -E mixer|audio lrwxr-xr-x 1 root wheel6 Jun 3 16:58 audio - audio1 crw-rw-rw- 1 root wheel 42, 128 Jun 3 17:01 audio0 crw-rw-rw- 1 root wheel 42, 129 May 28 19:07 audio1 crw-rw-rw- 1 root wheel 42, 130 May 28 19:07 audio2 lrwxr-xr-x 1 root wheel9 Jun 3 16:58 audioctl - audioctl1 crw-rw-rw- 1 root wheel 42, 192 May 28 19:07 audioctl0 crw-rw-rw- 1 root wheel 42, 193 May 28 19:07 audioctl1 crw-rw-rw- 1 root wheel 42, 194 May 28 19:07 audioctl2 lrwxr-xr-x 1 root wheel6 Jun 3 16:58 mixer - mixer1 crw-rw-rw- 1 root wheel 42, 16 May 28 19:07 mixer0 crw-rw-rw- 1 root wheel 42, 17 May 28 19:07 mixer1 crw-rw-rw- 1 root wheel 42, 18 May 28 19:07 mixer2 But it is still defaulting to my builtin soundcard. How can i change the default sounddevice from audio0 to audio1? I think using sndiod(1) is the answer, in the most simplistic form, something like this in your rc.conf.local(8) should suffice: sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default This should make your audio0 device available as snd/0.onboard and your audio1 device as the default sound device. (Both should be available as snd/0 and snd/1 respectively as well IIRC). /Regards Johan Svensson DMESG: dmesg | grep audio audio0 at azalia0 audio0 at azalia0 audio0 at azalia0 audio0 at azalia0 uaudio0 at uhub2 port 1 configuration 1 interface 1 NuForce, Inc. NuForce \M-5DAC 2 rev 1.10/0.01 addr 3 uaudio0: ignored setting with type 8193 format If I'm correct format 8193 (== 0x2001) means IEC1937 AC-3. This is an encoded format. AFAICT the uaudio driver only supports plain PCM formats. (unencoded audio samples) Do you know if your device only supports AC-3 inputs or can it also handle PCM signals ? (running 'lsusb -v', from the usbutils package, on the device should give a good clue what your device supports) uaudio0: audio rev 1.00, 2 mixer controls audio1 at uaudio0 I can successfully run this command: if i use audioctl1 instead of audio1 it works, i dont know why tho. # audioctl -f /dev/audioctl1 name=USB audio version= config=uaudio encodings=slinear_le:16:2:1,slinear_le:24:3:1 properties=independent full_duplex=0 fullduplex=0 blocksize=8816 hiwat=7 lowat=5 output_muted=0 monitor_gain=0 mode= play.rate=44100 play.channels=2 play.precision=16 play.bps=2 play.msb=1 play.encoding=slinear_le play.gain=127 play.balance=32 play.port=0x0 play.avail_ports=0x0 play.seek=0 play.samples=0 play.eof=0 play.pause=0 play.error=0 play.waiting=0 play.open=0 play.active=0 play.buffer_size=65536 play.block_size=8816 play.errors=0 record.rate=44100 record.channels=2 record.precision=16 record.bps=2 record.msb=1 record.encoding=slinear_le record.gain=127 record.balance=32 record.port=0x0 record.avail_ports=0x0 record.seek=0 record.samples=0 record.eof=0 record.pause=0 record.error=0 record.waiting=0 record.open=0 record.active=0 record.buffer_size=65536 record.block_size=8816 record.errors=0 here is the output from the device in lsusb: Bus 000 Device 003: ID 1852:db96 GYROCOM CC Co., LTD Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x1852 GYROCOM CC Co., LTD idProduct 0xdb96 bcdDevice0.01 iManufacturer 1 NuForce, Inc. iProduct2 NuForce µDAC 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 251 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType33 bcdHID 1.00 bCountryCode
Re: Change default audiodevice in OpenBSD-current
On 06/03/14 18:22, Remco wrote: Johan Svensson wrote: I am trying to change my default output device from my builtin soundcard to an usb soundcard which is an output only device. I have tried: # audioctl -f /dev/audio1 audioctl: /dev/audio1: Device not configured It seems this device does not exist from the kernel's point of view. (there's also /dev/audioctl1, but using that probably doesn't make a difference) I think there should be some controller that you configuring the audio device. But i manually tried to change the symlinks in the dev directory: # ls -la * | grep -E mixer|audio lrwxr-xr-x 1 root wheel6 Jun 3 16:58 audio - audio1 crw-rw-rw- 1 root wheel 42, 128 Jun 3 17:01 audio0 crw-rw-rw- 1 root wheel 42, 129 May 28 19:07 audio1 crw-rw-rw- 1 root wheel 42, 130 May 28 19:07 audio2 lrwxr-xr-x 1 root wheel9 Jun 3 16:58 audioctl - audioctl1 crw-rw-rw- 1 root wheel 42, 192 May 28 19:07 audioctl0 crw-rw-rw- 1 root wheel 42, 193 May 28 19:07 audioctl1 crw-rw-rw- 1 root wheel 42, 194 May 28 19:07 audioctl2 lrwxr-xr-x 1 root wheel6 Jun 3 16:58 mixer - mixer1 crw-rw-rw- 1 root wheel 42, 16 May 28 19:07 mixer0 crw-rw-rw- 1 root wheel 42, 17 May 28 19:07 mixer1 crw-rw-rw- 1 root wheel 42, 18 May 28 19:07 mixer2 But it is still defaulting to my builtin soundcard. How can i change the default sounddevice from audio0 to audio1? I think using sndiod(1) is the answer, in the most simplistic form, something like this in your rc.conf.local(8) should suffice: sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default This should make your audio0 device available as snd/0.onboard and your audio1 device as the default sound device. (Both should be available as snd/0 and snd/1 respectively as well IIRC). /Regards Johan Svensson DMESG: dmesg | grep audio audio0 at azalia0 audio0 at azalia0 audio0 at azalia0 audio0 at azalia0 uaudio0 at uhub2 port 1 configuration 1 interface 1 NuForce, Inc. NuForce \M-5DAC 2 rev 1.10/0.01 addr 3 uaudio0: ignored setting with type 8193 format If I'm correct format 8193 (== 0x2001) means IEC1937 AC-3. This is an encoded format. AFAICT the uaudio driver only supports plain PCM formats. (unencoded audio samples) Do you know if your device only supports AC-3 inputs or can it also handle PCM signals ? (running 'lsusb -v', from the usbutils package, on the device should give a good clue what your device supports) uaudio0: audio rev 1.00, 2 mixer controls audio1 at uaudio0 I have updated my rc.conf.local line with sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default but the default output device is still builtin sounddevice.
Re: Change default audiodevice in OpenBSD-current
On Tue, Jun 03, 2014 at 06:22:01PM +0200, Remco wrote: Johan Svensson wrote: I am trying to change my default output device from my builtin soundcard to an usb soundcard which is an output only device. I have tried: # audioctl -f /dev/audio1 audioctl: /dev/audio1: Device not configured It seems this device does not exist from the kernel's point of view. (there's also /dev/audioctl1, but using that probably doesn't make a difference) I think there should be some controller that you configuring the audio device. But i manually tried to change the symlinks in the dev directory: # ls -la * | grep -E mixer|audio lrwxr-xr-x 1 root wheel6 Jun 3 16:58 audio - audio1 crw-rw-rw- 1 root wheel 42, 128 Jun 3 17:01 audio0 crw-rw-rw- 1 root wheel 42, 129 May 28 19:07 audio1 crw-rw-rw- 1 root wheel 42, 130 May 28 19:07 audio2 lrwxr-xr-x 1 root wheel9 Jun 3 16:58 audioctl - audioctl1 crw-rw-rw- 1 root wheel 42, 192 May 28 19:07 audioctl0 crw-rw-rw- 1 root wheel 42, 193 May 28 19:07 audioctl1 crw-rw-rw- 1 root wheel 42, 194 May 28 19:07 audioctl2 lrwxr-xr-x 1 root wheel6 Jun 3 16:58 mixer - mixer1 crw-rw-rw- 1 root wheel 42, 16 May 28 19:07 mixer0 crw-rw-rw- 1 root wheel 42, 17 May 28 19:07 mixer1 crw-rw-rw- 1 root wheel 42, 18 May 28 19:07 mixer2 But it is still defaulting to my builtin soundcard. How can i change the default sounddevice from audio0 to audio1? I think using sndiod(1) is the answer, in the most simplistic form, something like this in your rc.conf.local(8) should suffice: sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default This should make your audio0 device available as snd/0.onboard and your audio1 device as the default sound device. (Both should be available as snd/0 and snd/1 respectively as well IIRC). This changed a while ago: the device number in snd/N corrsponds to the number of the -f option of sndiod. And snd/0 is always the default. So I'd suggest: sndiod_flags=-f rsnd/1 -f rsnd/0 This will kind of exchange the first two devices. I.e. this exposes snd/0 as sub-device of rsnd/1 and snd/1 as sub-device of rsnd/0. -- Alexandre
Re: Change default audiodevice in OpenBSD-current
On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote: sndiod_flags=-f rsnd/1 -f rsnd/0 This will kind of exchange the first two devices. I.e. this exposes snd/0 as sub-device of rsnd/1 and snd/1 as sub-device of rsnd/0. If device renumbering seems confusing/ugly, another option would be to keep the kernel order: sndiod_flags=-f rsnd/0 -f rsnd/1 then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent -- Alexandre
Re: Change default audiodevice in OpenBSD-current
On 06/03/14 19:33, Alexandre Ratchov wrote: On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote: sndiod_flags=-f rsnd/1 -f rsnd/0 This will kind of exchange the first two devices. I.e. this exposes snd/0 as sub-device of rsnd/1 and snd/1 as sub-device of rsnd/0. If device renumbering seems confusing/ugly, another option would be to keep the kernel order: sndiod_flags=-f rsnd/0 -f rsnd/1 then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent -- Alexandre grep sndiod /etc/rc.conf.local #sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default sndiod_flags=-f rsnd/1 -f rsnd/0 #sndiod_flags=-f rsnd/0 -f rsnd/1 I've tried all three of the settings, the first and the last defaults to builtin soundcard. But if I use the second configuration setting this shows up in dmesg: ehci0: Error opening low/full speed isoc endpoint. A low/full speed device is attached to a USB2 hub, and transaction translations are not yet supported. Reattach the device to the root hub instead. uaudio_chan_open: error creating pipe: err=INVAL endpt=0x03 I dont know if that helps. //Johan
Re: Change default audiodevice in OpenBSD-current
On Tue, Jun 03, 2014 at 07:59:49PM +0200, Johan Svensson wrote: On 06/03/14 19:33, Alexandre Ratchov wrote: On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote: sndiod_flags=-f rsnd/1 -f rsnd/0 This will kind of exchange the first two devices. I.e. this exposes snd/0 as sub-device of rsnd/1 and snd/1 as sub-device of rsnd/0. If device renumbering seems confusing/ugly, another option would be to keep the kernel order: sndiod_flags=-f rsnd/0 -f rsnd/1 then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent -- Alexandre grep sndiod /etc/rc.conf.local #sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default sndiod_flags=-f rsnd/1 -f rsnd/0 #sndiod_flags=-f rsnd/0 -f rsnd/1 I've tried all three of the settings, the first and the last defaults to builtin soundcard. But if I use the second configuration setting this shows up in dmesg: ehci0: Error opening low/full speed isoc endpoint. A low/full speed device is attached to a USB2 hub, and transaction translations are not yet supported. Reattach the device to the root hub instead. uaudio_chan_open: error creating pipe: err=INVAL endpt=0x03 the usb stack is incomplete and doesn't support rate matching hubs yet; sorry your sound card can't work on this machine yet. recently discussed here: http://comments.gmane.org/gmane.os.openbsd.misc/212991 -- Alexandre
Re: Change default audiodevice in OpenBSD-current
On 06/03/14 20:08, Alexandre Ratchov wrote: On Tue, Jun 03, 2014 at 07:59:49PM +0200, Johan Svensson wrote: On 06/03/14 19:33, Alexandre Ratchov wrote: On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote: sndiod_flags=-f rsnd/1 -f rsnd/0 This will kind of exchange the first two devices. I.e. this exposes snd/0 as sub-device of rsnd/1 and snd/1 as sub-device of rsnd/0. If device renumbering seems confusing/ugly, another option would be to keep the kernel order: sndiod_flags=-f rsnd/0 -f rsnd/1 then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent -- Alexandre grep sndiod /etc/rc.conf.local #sndiod_flags=-f rsnd/0 -s onboard -f rsnd/1 -s default sndiod_flags=-f rsnd/1 -f rsnd/0 #sndiod_flags=-f rsnd/0 -f rsnd/1 I've tried all three of the settings, the first and the last defaults to builtin soundcard. But if I use the second configuration setting this shows up in dmesg: ehci0: Error opening low/full speed isoc endpoint. A low/full speed device is attached to a USB2 hub, and transaction translations are not yet supported. Reattach the device to the root hub instead. uaudio_chan_open: error creating pipe: err=INVAL endpt=0x03 the usb stack is incomplete and doesn't support rate matching hubs yet; sorry your sound card can't work on this machine yet. recently discussed here: http://comments.gmane.org/gmane.os.openbsd.misc/212991 -- Alexandre Okey, that explains it. Thanks for your help. /Johan
Re: Change default audiodevice in OpenBSD-current
On Tue, Jun 03, 2014 at 05:56:50PM BST, Johan Svensson wrote: I can successfully run this command: if i use audioctl1 instead of audio1 it works, i dont know why tho. # audioctl -f /dev/audioctl1 [...] That's because, instead of providing audio device to the '-f' option, you need to provide audio *control* device. man 1 audioctl Regards, Raf