Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2011 22:05:17 +0200
From:      Olivier Smedts <olivier@gid0.org>
To:        Clemens Ladisch <clemens@ladisch.de>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: [uaudio] M-Audio Fast Track Ultra is not recognized, where to start ?
Message-ID:  <BANLkTikky09rGqhTZ8QyHycFcJk-=73JWA@mail.gmail.com>
In-Reply-To: <4DF87676.1090303@ladisch.de>
References:  <BANLkTimXnhsxem2rUtieMO0c8b%2B-gAgunQ@mail.gmail.com> <201106142156.59630.hselasky@c2i.net> <BANLkTinF1Qic5cCUgbgcW7uNEei1J7Kx1A@mail.gmail.com> <BANLkTi=NzB8Dne74FHE=j4jdzROEwGztQQ@mail.gmail.com> <4DF87676.1090303@ladisch.de>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/6/15 Clemens Ladisch <clemens@ladisch.de>:
> Olivier Smedts wrote:
>> 2011/6/15 Olivier Smedts <olivier@gid0.org>:
>> > I think "uaudio_mixer_fill_info: invalid Audio Control header" is inte=
resting.
>
> The audio control interface is marked as being vendor-specific, so you'd
> have to add some quirks to the driver.
>
> The control and audio interfaces actually have audio descriptors, so you
> just have to tell the driver to look at the interfaces even though their
> bInterfaceClass seems to be wrong.

Ok, I tried this :
# kldload snd_uaudio.ko
# kldload usb_quirk.ko
# sysctl hw.usb.uaudio.debug=3D1
# usbconfig add_dev_quirk_vplh 0x0763 0x2080 0x0000 0xffff UQ_AU_VENDOR_CLA=
SS

Plugged the device...
ugen7.3: <M-Audio> at usbus7
uaudio0: <Fast Track Ultra> on usbus7
uaudio_chan_dump_ep_desc: endpoint=3D0xfffffe0025c0267c bLength=3D7
bDescriptorType=3D5
bEndpointAddress=3D1 bmAttributes=3D0x5
wMaxPacketSize=3D312 bInterval=3D1
bRefresh=3D0 bSynchAddress=3D0
uaudio_chan_fill_info_sub: Sample rate =3D 96000Hz, channels =3D 8, bits =
=3D
24, format =3D 24-bit S-LE PCM
uaudio_chan_dump_ep_desc: endpoint=3D0xfffffe0025c026be bLength=3D7
bDescriptorType=3D5
bEndpointAddress=3D129 bmAttributes=3D0x5
wMaxPacketSize=3D312 bInterval=3D1
bRefresh=3D0 bSynchAddress=3D0
uaudio_chan_fill_info_sub: Sample rate =3D 96000Hz, channels =3D 8, bits =
=3D
24, format =3D 24-bit S-LE PCM
uaudio_mixer_fill_info: Maximum ID=3D3
uaudio_mixer_fill_info: id 3:
uaudio_mixer_fill_info:  - AC_INPUT type=3DUAT_STREAM
uaudio_mixer_dump_cluster: cluster: bNrChannels=3D0 iChannelNames=3D8
wChannelConfig=3D0x0003:
uaudio_mixer_dump_cluster:  - LEFT
uaudio_mixer_dump_cluster:  - RIGHT
uaudio_mixer_fill_info: Inputs to this ID are:
uaudio_mixer_fill_info:   -- ID=3D3
uaudio_mixer_fill_info: Outputs from this ID are:
uaudio_mixer_fill_info: id 2:
uaudio_mixer_fill_info:  - AC_OUTPUT type=3DUAT_STREAM src=3D1
uaudio_mixer_fill_info: Inputs to this ID are:
uaudio_mixer_fill_info:   -- ID=3D1
uaudio_mixer_fill_info: Outputs from this ID are:
uaudio_mixer_fill_info: id 1:
uaudio_mixer_fill_info:  - AC_INPUT type=3DUATE_LINECONN
uaudio_mixer_dump_cluster: cluster: bNrChannels=3D0 iChannelNames=3D8
wChannelConfig=3D0x0003:
uaudio_mixer_dump_cluster:  - LEFT
uaudio_mixer_dump_cluster:  - RIGHT
uaudio_mixer_fill_info: Inputs to this ID are:
uaudio_mixer_fill_info:   -- ID=3D1
uaudio_mixer_fill_info: Outputs from this ID are:
uaudio_mixer_fill_info:   -- ID=3D2
uaudio_attach: audio rev 1.00
uaudio_attach: 0 mixer controls
uaudio0: Play: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio0: Record: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio0: MIDI sequencer
uaudio_attach: doing child attach
umidi_bulk_read_callback: start
pcm4: <USB audio> on uaudio0
uaudio_attach_sub: emulating master volume
uaudio_mixer_init_sub:
uaudio_chan_init: endpoint=3D0x01, speed=3D96000, iface=3D1 alt=3D1
uaudio_chan_init: fps=3D8000 sample_rem=3D0
uaudio_chan_init: endpoint=3D0x81, speed=3D96000, iface=3D2 alt=3D1
uaudio_chan_init: fps=3D8000 sample_rem=3D0
uaudio1: <M-Audio DFU> on usbus7
uaudio_chan_dump_ep_desc: endpoint=3D0xfffffe0025c0267c bLength=3D7
bDescriptorType=3D5
bEndpointAddress=3D1 bmAttributes=3D0x5
wMaxPacketSize=3D312 bInterval=3D1
bRefresh=3D0 bSynchAddress=3D0
uaudio_chan_fill_info_sub: Sample rate =3D 96000Hz, channels =3D 8, bits =
=3D
24, format =3D 24-bit S-LE PCM
uaudio_chan_dump_ep_desc: endpoint=3D0xfffffe0025c026be bLength=3D7
bDescriptorType=3D5
bEndpointAddress=3D129 bmAttributes=3D0x5
wMaxPacketSize=3D312 bInterval=3D1
bRefresh=3D0 bSynchAddress=3D0
uaudio_chan_fill_info_sub: Sample rate =3D 96000Hz, channels =3D 8, bits =
=3D
24, format =3D 24-bit S-LE PCM
uaudio_mixer_fill_info: invalid Audio Control header
uaudio_attach: audio rev 0.00
uaudio_attach: 0 mixer controls
uaudio1: Play: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio1: Record: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio1: MIDI sequencer
uaudio_attach: doing child attach
umidi_bulk_read_callback: start
pcm5: <USB audio> on uaudio1
uaudio_attach_sub: emulating master volume
uaudio_mixer_init_sub:
uaudio_chan_init: endpoint=3D0x01, speed=3D96000, iface=3D1 alt=3D1
uaudio_chan_init: fps=3D8000 sample_rem=3D0
uaudio_chan_init: endpoint=3D0x81, speed=3D96000, iface=3D2 alt=3D1
uaudio_chan_init: fps=3D8000 sample_rem=3D0

So now it seems to be better. To have it in the kernel I think I
should only modify sys/dev/usb/usbdevs (but there's another vendor
with the same ID) and sys/dev/usb/quirk/usb_quirk.c

# dmesg | grep uaudio0
uaudio0: <Fast Track Ultra> on usbus7
uaudio0: Play: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio0: Record: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio0: MIDI sequencer
pcm4: <USB audio> on uaudio0
# dmesg | grep uaudio1
uaudio1: <M-Audio DFU> on usbus7
uaudio1: Play: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio1: Record: 96000 Hz, 8 ch, 24-bit S-LE PCM format
uaudio1: MIDI sequencer
pcm5: <USB audio> on uaudio1
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Analog Devices AD1989B PCM #0 Analog> (play/rec) default
pcm1: <HDA Analog Devices AD1989B PCM #1 Analog> (play)
pcm2: <HDA Analog Devices AD1989B PCM #2 Digital> (play)
pcm3: <HDA Analog Devices AD1989B PCM #3 Digital> (play)
pcm4: <USB audio> (play/rec)
pcm5: <USB audio> (play/rec)

I don't know why two devices are detected, but at least the "96000 Hz,
8 ch, 24-bit S-LE PCM format" is correct !

Now I could
# sysctl hw.snd.default_unit=3D4
And play some audio files on the first two outputs of the device (left
and right channel). A little clicking noise during playback (not when
there is a silence).
I had the same clicking noise with alsa under Ubuntu Studio when using
high sample rates. The Fast Track Ultra manual says it has an internal
default clock frequency of 44100Hz, so I think that the driver should
change the internal clock frequency or give an external clock when
using sample rates different than 44100Hz.

I tried starting jack but it could only see two inputs and two outputs
and no midi. I connected the first input to the outputs, no sound
(other than the monitor) on the outputs when playing something through
the input.
Next I configured jack like this (with qjackctl) :
Driver : oss
Audio : Duplex
Input device : /dev/dsp4 (so that I don't have to change hw.snd.default_uni=
t)
Output device : /dev/dsp4
Input channels : 8
Output channels : 8
Samples/period : 256
Sample rate (Hz) : 96000
Periods/buffer : 2
Depth (bit) : 24

Nothing more... I tried various combinations of settings, some
defaults, I could not hear the input. I don't think jack really likes
oss... I also tried outputting vlc in jack, changing some dev.pcm.4.*
sysctls but did not find something really useful. Did change vchans
number, mode and format, the loud noises from jack were different but
still noises.

Any advice ?

>
> The Linux driver overrides the audio interfaces' descriptors (see here:
> <http://git.alsa-project.org/?p=3Dalsa-kernel.git;a=3Dblob;hb=3DHEAD;f=3D=
sound/usb/quirks-table.h#l1981>),
> but I don't remember what the problem was, probably some wrong endpoint
> attributes.
>
>
> Regards,
> Clemens
>

Thanks for your help !

--=20
Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 ASCII ribbon campaign ( )
e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X
www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \

=A0 "Il y a seulement 10 sortes de gens dans le monde :
=A0 ceux qui comprennent le binaire,
=A0 et ceux qui ne le comprennent pas."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikky09rGqhTZ8QyHycFcJk-=73JWA>