You are not logged in.

#26 2015-07-25 22:30:38

Awebb
Member
Registered: 2010-05-06
Posts: 6,282

Re: USB DAC Support

The more mainstream the better. Ubuntu live, Opensuse, Fedora (in that order).

EDIT: This is what I always do, when strange hardware doesn't work, I try it in Ubuntu live and grep the sources for the device ID's if it works there.

Last edited by Awebb (2015-07-25 22:31:53)

Offline

#27 2015-07-26 08:05:13

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: USB DAC Support

Alright, I'll give it that  try.

I didn't realize you meant those mainstream distro's when you mentioned non-vanilla kernels.

Offline

#28 2015-10-15 08:47:11

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: USB DAC Support

@mouseman, any progress ?

Offline

#29 2015-10-23 15:28:21

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: USB DAC Support

No, it's not working.

Offline

#30 2015-10-23 15:34:15

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: USB DAC Support

unhappy to hear that

Offline

#31 2016-05-07 11:23:35

mansr
Member
Registered: 2016-05-07
Posts: 3

Re: USB DAC Support

I have managed to record audio off a UH-700, but it's behaving a bit erratically. The fact that it works at all suggests getting at least basic support for this device shouldn't be too hard. Did you get any detailed docs from Tascam?

Offline

#32 2016-05-07 14:59:26

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: USB DAC Support

mansr, can u listen to music through this device?

Offline

#33 2016-05-07 15:54:14

mansr
Member
Registered: 2016-05-07
Posts: 3

Re: USB DAC Support

I can get sound out of it, but there are issues. Hopefully it just needs some magic setup to work properly. It is mostly USB Audio class compatible.

Offline

#34 2016-07-19 13:56:38

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: USB DAC Support

guys, any updates?

Offline

#35 2016-07-23 16:28:51

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: USB DAC Support

Took a look at this, but I don't own such a device and the only hard data offered is from Mouseman way back in the year 2014. So it's totally possible that Tascam has changed things since then.

Looked at the verbose output from lsusb that Mouseman linked to in post #6 and started to wonder if it's not showing up in aplay/arecord because Tascam decided to describe it's proprietary interface as the first USB configuration and the USB Audio Class interface as it's second config. But perhaps not, because mansr somehow got it to spit sound (but kept how he/she did it a secret from everyone).

Anyway, here's a wild shot in the dark... try forcing Linux to use the device's USB Audio Class configuration (config number 2) by doing something like the following:

Plug the Tascam device into a USB port on a booted system and find it's output in dmesg. One of the newest messages should give you a hint about where to find it's settings in the /sys directory. Then change bConfigurationValue to "2" and see if the device now shows up in aplay and/or arecord.

Here's an example (but obviously for a completely different device):

(Here is the "dmesg" snippet for my device of interest)

[ 6350.570418] input: C-Media USB Audio Device    as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.3/0003:0D8C:0008.0003/input/input19

(Now go to the USB directory for that device in /sys. Notice that it's using a subset of the dmesg output and should contain "bConfigurationValue")

$ cd /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10/

(root authority is now needed)

$ /usr/bin/echo -n 2 > bConfigurationValue

If that works by some bizarre miracle it still won't solve the issue of the proprietary operations working as intended, but creating a quirk to get the audio portion working without manual intervention would be possible.

Offline

#36 2016-07-23 16:55:10

mansr
Member
Registered: 2016-05-07
Posts: 3

Re: USB DAC Support

It's easy enough to get ALSA to recognise the device, and as I said earlier, it sometimes does more or less what you want. Just as often, however, it doesn't work quite right. There's something weird going on with sample rate selection, for instance. I'm guessing it needs some initial non-standard configuration even though the actual sample transport uses the standard interface.

Offline

#37 2016-07-24 06:33:26

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: USB DAC Support

It's easy enough to get ALSA to recognise the device, and as I said earlier, it sometimes does more or less what you want. Just as often, however, it doesn't work quite right. There's something weird going on with sample rate selection, for instance. I'm guessing it needs some initial non-standard configuration even though the actual sample transport uses the standard interface.

hmmm.... Don't see how your posts are going to help solve the problem that Mousman and others are having with this device. Care to offer anything of substance?

Offline

#38 2016-09-19 04:03:20

mrawfull
Member
Registered: 2011-11-26
Posts: 25

Re: USB DAC Support

I use TEAC AI-101 USB DAC and I just get system timeout, no audio at all

[ 2844.832700] usb 3-2: new high-speed USB device number 6 using xhci_hcd
[ 2845.576788] usbcore: registered new interface driver snd-usb-audio
[ 3000.776151] INFO: task pulseaudio:538 blocked for more than 120 seconds.
[ 3000.776154]       Tainted: P           O    4.7.4-1-ARCH #1
[ 3000.776155] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3000.776156] pulseaudio      D ffff8807ef74fad8     0   538    467 0x00000000
[ 3000.776159]  ffff8807ef74fad8 00ff8807f3f5c800 ffffffff8180d500 ffff8807f2851c80
[ 3000.776161]  ffff8807ef74fab8 ffff8807ef750000 ffffffffa00852b0 ffff8807b3126a00
[ 3000.776163]  ffffffffa0088254 ffff880794750178 ffff8807ef74faf0 ffffffff815d3a8c
[ 3000.776164] Call Trace:
[ 3000.776169]  [<ffffffff815d3a8c>] schedule+0x3c/0x90
[ 3000.776175]  [<ffffffffa006a98c>] usb_kill_urb.part.4+0x5c/0xb0 [usbcore]
[ 3000.776177]  [<ffffffff810bcce0>] ? wake_atomic_t_function+0x60/0x60
[ 3000.776181]  [<ffffffffa006aa01>] usb_kill_urb+0x21/0x30 [usbcore]
[ 3000.776184]  [<ffffffffa006967d>] usb_hcd_flush_endpoint+0xad/0x180 [usbcore]
[ 3000.776187]  [<ffffffffa006c4a8>] usb_disable_endpoint+0x58/0xb0 [usbcore]
[ 3000.776190]  [<ffffffffa006c545>] usb_disable_interface+0x45/0x60 [usbcore]
[ 3000.776193]  [<ffffffffa006ca72>] usb_set_interface+0x1a2/0x380 [usbcore]
[ 3000.776197]  [<ffffffffa0594a5a>] snd_usb_init_sample_rate+0x1ca/0x3a0 [snd_usb_audio]
[ 3000.776200]  [<ffffffffa05a0a95>] snd_usb_pcm_prepare+0xb5/0x520 [snd_usb_audio]
[ 3000.776203]  [<ffffffffa04daedd>] ? snd_pcm_stream_unlock+0x2d/0x50 [snd_pcm]
[ 3000.776205]  [<ffffffffa04daedd>] ? snd_pcm_stream_unlock+0x2d/0x50 [snd_pcm]
[ 3000.776208]  [<ffffffffa04dadd7>] snd_pcm_do_prepare+0x17/0x30 [snd_pcm]
[ 3000.776210]  [<ffffffffa04da93f>] snd_pcm_action_single+0x2f/0x70 [snd_pcm]
[ 3000.776212]  [<ffffffffa04da9e8>] snd_pcm_action_nonatomic+0x68/0x70 [snd_pcm]
[ 3000.776214]  [<ffffffffa04dd463>] snd_pcm_common_ioctl1+0x653/0xba0 [snd_pcm]
[ 3000.776216]  [<ffffffffa04ddae9>] snd_pcm_playback_ioctl1+0x139/0x260 [snd_pcm]
[ 3000.776219]  [<ffffffffa04ddc37>] snd_pcm_playback_ioctl+0x27/0x40 [snd_pcm]
[ 3000.776221]  [<ffffffff8120cd92>] do_vfs_ioctl+0xa2/0x5d0
[ 3000.776224]  [<ffffffff81217e27>] ? __fget+0x77/0xb0
[ 3000.776225]  [<ffffffff8120d339>] SyS_ioctl+0x79/0x90
[ 3000.776228]  [<ffffffff815d7772>] entry_SYSCALL_64_fastpath+0x1a/0xa4
[ 3120.777019] INFO: task pulseaudio:538 blocked for more than 120 seconds.
[ 3120.777022]       Tainted: P           O    4.7.4-1-ARCH #1
[ 3120.777022] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3120.777023] pulseaudio      D ffff8807ef74fad8     0   538    467 0x00000000
[ 3120.777025]  ffff8807ef74fad8 00ff8807f3f5c800 ffffffff8180d500 ffff8807f2851c80
[ 3120.777026]  ffff8807ef74fab8 ffff8807ef750000 ffffffffa00852b0 ffff8807b3126a00
[ 3120.777027]  ffffffffa0088254 ffff880794750178 ffff8807ef74faf0 ffffffff815d3a8c
[ 3120.777028] Call Trace:
[ 3120.777032]  [<ffffffff815d3a8c>] schedule+0x3c/0x90
[ 3120.777036]  [<ffffffffa006a98c>] usb_kill_urb.part.4+0x5c/0xb0 [usbcore]
[ 3120.777038]  [<ffffffff810bcce0>] ? wake_atomic_t_function+0x60/0x60
[ 3120.777040]  [<ffffffffa006aa01>] usb_kill_urb+0x21/0x30 [usbcore]
[ 3120.777042]  [<ffffffffa006967d>] usb_hcd_flush_endpoint+0xad/0x180 [usbcore]
[ 3120.777044]  [<ffffffffa006c4a8>] usb_disable_endpoint+0x58/0xb0 [usbcore]
[ 3120.777045]  [<ffffffffa006c545>] usb_disable_interface+0x45/0x60 [usbcore]
[ 3120.777047]  [<ffffffffa006ca72>] usb_set_interface+0x1a2/0x380 [usbcore]
[ 3120.777050]  [<ffffffffa0594a5a>] snd_usb_init_sample_rate+0x1ca/0x3a0 [snd_usb_audio]
[ 3120.777052]  [<ffffffffa05a0a95>] snd_usb_pcm_prepare+0xb5/0x520 [snd_usb_audio]
[ 3120.777054]  [<ffffffffa04daedd>] ? snd_pcm_stream_unlock+0x2d/0x50 [snd_pcm]
[ 3120.777056]  [<ffffffffa04daedd>] ? snd_pcm_stream_unlock+0x2d/0x50 [snd_pcm]
[ 3120.777057]  [<ffffffffa04dadd7>] snd_pcm_do_prepare+0x17/0x30 [snd_pcm]
[ 3120.777059]  [<ffffffffa04da93f>] snd_pcm_action_single+0x2f/0x70 [snd_pcm]
[ 3120.777060]  [<ffffffffa04da9e8>] snd_pcm_action_nonatomic+0x68/0x70 [snd_pcm]
[ 3120.777061]  [<ffffffffa04dd463>] snd_pcm_common_ioctl1+0x653/0xba0 [snd_pcm]
[ 3120.777063]  [<ffffffffa04ddae9>] snd_pcm_playback_ioctl1+0x139/0x260 [snd_pcm]
[ 3120.777064]  [<ffffffffa04ddc37>] snd_pcm_playback_ioctl+0x27/0x40 [snd_pcm]
[ 3120.777066]  [<ffffffff8120cd92>] do_vfs_ioctl+0xa2/0x5d0
[ 3120.777067]  [<ffffffff81217e27>] ? __fget+0x77/0xb0
[ 3120.777068]  [<ffffffff8120d339>] SyS_ioctl+0x79/0x90
[ 3120.777070]  [<ffffffff815d7772>] entry_SYSCALL_64_fastpath+0x1a/0xa4

Offline

#39 2017-02-24 14:16:15

matthijs
Member
Registered: 2017-02-24
Posts: 1

Re: USB DAC Support

mouseman wrote:

Actually he just said the device is a standard class 2 audio device

They're using class/subclass/protocol "vendor specified" (FF/FF/FF), whereas the USB Audio 2.0 Device Class Definition requires EF/02/01. Ditto for the device qualifier. That alone disqualifies it from being a "standard class 2 audio device".

mouseman wrote:

it should be a simple matter of making the kernel "see it" as such

I've got some success by adding the device VID/PID to the usb audio driver:

echo 0644 8048 >/sys/bus/usb/drivers/snd-usb-audio/new_id

The kernel had some complaints:

[1660460.026926] usb 2-1.4: 1:2 : UAC_AS_GENERAL descriptor not found
[1660460.121807] usb 2-1.4: 2:2 : UAC_AS_GENERAL descriptor not found

but it appeared as audio device nevertheless. aplay -D hw:CARD=UH7000 accepted 2 channels 48 kHz only.

If I switch to the second configuration:

echo 2 >/sys/bus/usb/devices/2-1.4/bConfigurationValue

then the kernel has different complaints:

[1660667.344968] usb 2-1.4: invalid UAC_HEADER (v1)
[1660667.344976] snd-usb-audio: probe of 2-1.4:2.3 failed with error -22

but again it appeared as audio device, but with noticably different behaviour.  Now it required 4 channels, but it accepted various sample rates, with the leds on the frontpanel correctly changing to reflect the sample rate used.

Offline

#40 2017-02-26 05:01:34

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: USB DAC Support

Thanks for doing a deep dive on this ancient problem... and it's really good to finally see some progress even though I have no dog in this fight.

That alone disqualifies it from being a "standard class 2 audio device".

Yep. This device is far from being a "normal" audio USB Audio Class anything device. But it might be salvageable.

As far as the four channels; that's the way this thing advertises itself.

AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID              5
        bNrChannels             4
        bmChannelConfig   0x00000003
          Front Left (FL)
          Front Right (FR)
        bmControls    0x0000
        iChannelNames           0
        iTerminal               0

The "bNrChannels" and "bmChannelConfig" is basically saying that it requires four channels, but it's only going to pay attention to the Front Left and Front Right.

Proving (once again) that the developers lost sight of the objective since this device seems to only have "left" and "right" input. Four channels must have seemed like a great idea... and it might have saved them a few line of code; so simply a perfect idea at the time... while Linux/ALSA pays the price for that decision.

Now, as far as the salvage operation; you (and/or others) will find that there are other "quirks" that handle situations such as this in the "sound/usb/quirks-table.h" in the kernel code. It just takes someone to have the fortitude, and knowledge, to submit it upstream.

Last edited by pigiron (2017-02-26 05:46:46)

Offline

#41 2020-11-04 19:58:04

archsmith
Member
Registered: 2020-11-04
Posts: 1

Re: USB DAC Support

A few years late but found a workaround thus sharing it here in case people are still interested.

Preparations:
1. Make a Windows VM and install the Windows driver
2. Follow the idea in this thread to make UH-7000 recognizable by snd-usb-audio (add 0644 8048 to /sys/bus/usb/drivers/snd-usb-audio/new_id)

Steps:
1. Turn on the VM, redirect the USB device to the VM to let the Windows driver set it up properly, you can also use the mixer panel at this time to change settings as needed
2. Kill the VM
3. At this point it is ready to be used by ALSA/Pulse. Despite warnings like UAC_AS_GENERAL descriptor not found, at least the output/playback functions do work properly

Caveat:
Note that after restarting or reconnecting UH-7000 you need to use the VM (the Windows driver) again to properly set it up. On the other hand, if you keep the USB connection alive after the VM (the Windows driver) has set it up properly, it will keep working.

Next steps?
Looks like UH-7000's audio playback protocol is indeed close to the standard. But upon USB connection it won't initialize into the usable state without the Windows driver performing some proprietary setup steps.
Briefly looked at the USB interface using wireshark and the Windows driver indeed sent a lot more control outs to the device.
The actual configuration and mixer panel functions can be quite arduous to reverse engineer, But it might be feasible to simply replicate the proprietary setup steps during initialization.

Good luck, and thank you, to anyone motivated enough to try to get the proprietary setup steps to work under Linux without the VM or the Windows driver!

Last edited by archsmith (2020-11-04 20:18:25)

Offline

#42 2020-11-04 21:50:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: USB DAC Support

Thanks for a potential solution, however I'd say it's unlikely the OP of this particular thread still looks for a solution.

Closing.

Offline

Board footer

Powered by FluxBB