Re: ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-10 Thread Stuart Henderson
On 2017-05-09, Caolan McMahon  wrote:
> I recently installed OpenBSD 6.1 on my Lenovo ThinkPad x250. I use a
> USB DAC to listen to music because the built-in laptop audio is
> terrible.

That's useful information, the internal audio on older Thinkpads is
pretty good so that's another reason not to get a newer one :)

> OpenBSD appears to detect the USB audio device, but is unable to play
> any sound through it. I've seen similar posts on this list regarding
> USB 2.0 audio devices and various internal USB hub combinations
> causing issues, and I'm wondering if this device + laptop combination
> is a lost cause?

Is there a way to disable USB3 in bios?




Re: ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-09 Thread G
https://marc.info/?l=openbsd-misc=149408763225691=2

On 05/09/17 23:09, G wrote:
> i had problems with xhci driver too.
> I get
> "xhci0: wrong trb index (-1956096) max is 255"
> 
> I dont know if its relevant.
> 
> On 05/09/17 13:18, Stefan Sperling wrote:
>> On Tue, May 09, 2017 at 11:00:26AM +0100, Caolan McMahon wrote:
>>> uaudio_chan_open: error creating pipe: err=INVAL endpt=0x01
>>
>> The problem is that xhci(4) does not yet support isochronous
>> transfers which are needed for USB audio devices to work.
>> http://www.beyondlogic.org/usbnutshell/usb4.shtml#Isochronous
>>
>> AFAIK this also affects other devices such as cameras.
>>
>> USB disks work because they use bulk transfers.
>>
> 



Re: ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-09 Thread G
i had problems with xhci driver too.
I get
"xhci0: wrong trb index (-1956096) max is 255"

I dont know if its relevant.

On 05/09/17 13:18, Stefan Sperling wrote:
> On Tue, May 09, 2017 at 11:00:26AM +0100, Caolan McMahon wrote:
>> uaudio_chan_open: error creating pipe: err=INVAL endpt=0x01
> 
> The problem is that xhci(4) does not yet support isochronous
> transfers which are needed for USB audio devices to work.
> http://www.beyondlogic.org/usbnutshell/usb4.shtml#Isochronous
> 
> AFAIK this also affects other devices such as cameras.
> 
> USB disks work because they use bulk transfers.
> 



Re: ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-09 Thread Alexandre Ratchov
On Tue, May 09, 2017 at 11:00:26AM +0100, Caolan McMahon wrote:
> 
> $ usbdevs
> addr 1: xHCI root hub, Intel
>  addr 5: AudioQuest DragonFly, AudioQuest inc.
>  addr 2: VFS5011 Fingerprint Reader, Validity Sensors
>  addr 3: Bluetooth, Intel
>  addr 4: Integrated Camera, J8AECPB08
> addr 1: EHCI root hub, Intel
>  addr 2: Rate Matching Hub, Intel
> 
> $ mplayer beep.wav
> # I hear nothing
> 
> $ dmesg
> ...
> uaudio0 at uhub0 port 1 configuration 1 interface 0 "AudioQuest inc.
> AudioQuest DragonFly" rev 1.00/1.20 addr 5
> uaudio0: audio rev 1.00, 2 mixer controls
> audio1 at uaudio0
> uaudio_chan_open: error creating pipe: err=INVAL endpt=0x01
^

Saddly, the xhci driver doesn't support isochronous transfers yet. 
You could try to disable the xhci driver and see if it works.



Re: ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-09 Thread Stefan Sperling
On Tue, May 09, 2017 at 11:22:17AM +0100, Caolan McMahon wrote:
> Thanks Stefan. Do you know if anyone is working on this?

I am not aware of anyone working on this at present.
I hope it will happen some day.

I would also benefit from this since one of my laptops has its
internal audio device wired up on USB at xhci.



Re: ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-09 Thread Caolan McMahon
Thanks Stefan. Do you know if anyone is working on this?

On 9 May 2017 at 11:18, Stefan Sperling  wrote:
> On Tue, May 09, 2017 at 11:00:26AM +0100, Caolan McMahon wrote:
>> uaudio_chan_open: error creating pipe: err=INVAL endpt=0x01
>
> The problem is that xhci(4) does not yet support isochronous
> transfers which are needed for USB audio devices to work.
> http://www.beyondlogic.org/usbnutshell/usb4.shtml#Isochronous
>
> AFAIK this also affects other devices such as cameras.
>
> USB disks work because they use bulk transfers.



Re: ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-09 Thread Stefan Sperling
On Tue, May 09, 2017 at 11:00:26AM +0100, Caolan McMahon wrote:
> uaudio_chan_open: error creating pipe: err=INVAL endpt=0x01

The problem is that xhci(4) does not yet support isochronous
transfers which are needed for USB audio devices to work.
http://www.beyondlogic.org/usbnutshell/usb4.shtml#Isochronous

AFAIK this also affects other devices such as cameras.

USB disks work because they use bulk transfers.



ThinkPad x250 with USB DAC (Audioquest DragonFly v1.2)

2017-05-09 Thread Caolan McMahon
I recently installed OpenBSD 6.1 on my Lenovo ThinkPad x250. I use a
USB DAC to listen to music because the built-in laptop audio is
terrible.

OpenBSD appears to detect the USB audio device, but is unable to play
any sound through it. I've seen similar posts on this list regarding
USB 2.0 audio devices and various internal USB hub combinations
causing issues, and I'm wondering if this device + laptop combination
is a lost cause?

Here's what I tried:

$ mplayer beep.wav
# I hear a beep from speakers

# plug in USB DAC, it appears to be detected

$ usbdevs
addr 1: xHCI root hub, Intel
 addr 5: AudioQuest DragonFly, AudioQuest inc.
 addr 2: VFS5011 Fingerprint Reader, Validity Sensors
 addr 3: Bluetooth, Intel
 addr 4: Integrated Camera, J8AECPB08
addr 1: EHCI root hub, Intel
 addr 2: Rate Matching Hub, Intel

$ mplayer beep.wav
# I hear nothing

$ dmesg
...
uaudio0 at uhub0 port 1 configuration 1 interface 0 "AudioQuest inc.
AudioQuest DragonFly" rev 1.00/1.20 addr 5
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0
uaudio_chan_open: error creating pipe: err=INVAL endpt=0x01
audio1: failed to start playback

$ aucat -f rsnd/0 -i beep.wav
# sound from speakers

$ aucat -f rsnd/1 -i beep.wav
rsnd/1: unsupported audio params

$ mixerctl -f /dev/mixer0
inputs.dac-0:1=126,126
inputs.dac-2:3=126,126
record.adc-2:3_mute=off
record.adc-2:3=124,124
record.adc-0:1_mute=off
record.adc-0:1=124,124
inputs.mix_source=spkr3,mic2,beep
inputs.mix_spkr3=120,120
inputs.mix_mic2=120,120
inputs.mix_beep=120,120
inputs.mix2_source=dac-0:1,mix
inputs.mix3_source=dac-2:3,mix
inputs.mix4_source=dac-0:1,dac-2:3
inputs.mic=85,85
outputs.spkr_source=mix3
outputs.spkr_mute=off
outputs.spkr_eapd=on
outputs.hp_source=mix2
outputs.hp_mute=off
outputs.hp_boost=off
outputs.hp_eapd=on
outputs.spkr2_source=mix2
outputs.spkr2_mute=off
outputs.spkr2_boost=off
outputs.spkr2_eapd=on
inputs.spkr3=85,85
inputs.mic2=85,85
outputs.mic2_dir=input-vr80
record.adc-0:1_source=mic
record.adc-2:3_source=spkr3
outputs.hp_sense=unplugged
outputs.mic2_sense=unplugged
outputs.spkr_muters=hp
outputs.master=126,126
outputs.master.mute=off
outputs.master.slaves=dac-0:1,dac-2:3,spkr,hp,spkr2
record.volume=124,124
record.volume.mute=off
record.volume.slaves=adc-2:3,adc-0:1

$ mixerctl -f /dev/mixer1
outputs.spkr.mute=off
outputs.spkr=81,81

$ audioctl -f /dev/audioctl0
name=azalia1
mode=
pause=0
active=0
nblks=2
blksz=4416
rate=44100
encoding=s16le
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0

$ audioctl -f /dev/audioctl1
name=uaudio0
mode=
pause=1
active=0
nblks=2
blksz=4410
rate=44100
encoding=s24le3
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0

# try rebooting and disabling xhci using boot -c

$ usbdevs
addr 1: EHCI root hub, Intel
 addr 2: Rate Matching Hub, Intel

# plugging in the USB DAC it is not detected at all

# I also tried rebooting and disabling ehci using boot -c, just in
# case, but predictably it worked the same as it did originally

$ usbdevs
addr 1: xHCI root hub, Intel
 addr 2: AudioQuest DragonFly, AudioQuest inc.
 addr 3: VFS5011 Fingerprint Reader, Validity Sensors
 addr 4: Bluetooth, Intel
 addr 5: Integrated Camera, J8AECPB08

$ dmesg
...
uaudio0 at uhub0 port 1 configuration 1 interface 0 "AudioQuest inc.
AudioQuest DragonFly" rev 1.00/1.20 addr 2
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0

$ aucat -f rsnd/0 -i downloads/beep.wav
# beep from speakers

$ aucat -f rsnd/1 -i downloads/beep.wav
rsnd/1: unsupported audio params


What else should I try?

Caolan