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 interesting. > > 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=1 # usbconfig add_dev_quirk_vplh 0x0763 0x2080 0x0000 0xffff UQ_AU_VENDOR_CLASS Plugged the device... ugen7.3: <M-Audio> at usbus7 uaudio0: <Fast Track Ultra> on usbus7 uaudio_chan_dump_ep_desc: endpoint=0xfffffe0025c0267c bLength=7 bDescriptorType=5 bEndpointAddress=1 bmAttributes=0x5 wMaxPacketSize=312 bInterval=1 bRefresh=0 bSynchAddress=0 uaudio_chan_fill_info_sub: Sample rate = 96000Hz, channels = 8, bits = 24, format = 24-bit S-LE PCM uaudio_chan_dump_ep_desc: endpoint=0xfffffe0025c026be bLength=7 bDescriptorType=5 bEndpointAddress=129 bmAttributes=0x5 wMaxPacketSize=312 bInterval=1 bRefresh=0 bSynchAddress=0 uaudio_chan_fill_info_sub: Sample rate = 96000Hz, channels = 8, bits = 24, format = 24-bit S-LE PCM uaudio_mixer_fill_info: Maximum ID=3 uaudio_mixer_fill_info: id 3: uaudio_mixer_fill_info: - AC_INPUT type=UAT_STREAM uaudio_mixer_dump_cluster: cluster: bNrChannels=0 iChannelNames=8 wChannelConfig=0x0003: uaudio_mixer_dump_cluster: - LEFT uaudio_mixer_dump_cluster: - RIGHT uaudio_mixer_fill_info: Inputs to this ID are: uaudio_mixer_fill_info: -- ID=3 uaudio_mixer_fill_info: Outputs from this ID are: uaudio_mixer_fill_info: id 2: uaudio_mixer_fill_info: - AC_OUTPUT type=UAT_STREAM src=1 uaudio_mixer_fill_info: Inputs to this ID are: uaudio_mixer_fill_info: -- ID=1 uaudio_mixer_fill_info: Outputs from this ID are: uaudio_mixer_fill_info: id 1: uaudio_mixer_fill_info: - AC_INPUT type=UATE_LINECONN uaudio_mixer_dump_cluster: cluster: bNrChannels=0 iChannelNames=8 wChannelConfig=0x0003: uaudio_mixer_dump_cluster: - LEFT uaudio_mixer_dump_cluster: - RIGHT uaudio_mixer_fill_info: Inputs to this ID are: uaudio_mixer_fill_info: -- ID=1 uaudio_mixer_fill_info: Outputs from this ID are: uaudio_mixer_fill_info: -- ID=2 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=0x01, speed=96000, iface=1 alt=1 uaudio_chan_init: fps=8000 sample_rem=0 uaudio_chan_init: endpoint=0x81, speed=96000, iface=2 alt=1 uaudio_chan_init: fps=8000 sample_rem=0 uaudio1: <M-Audio DFU> on usbus7 uaudio_chan_dump_ep_desc: endpoint=0xfffffe0025c0267c bLength=7 bDescriptorType=5 bEndpointAddress=1 bmAttributes=0x5 wMaxPacketSize=312 bInterval=1 bRefresh=0 bSynchAddress=0 uaudio_chan_fill_info_sub: Sample rate = 96000Hz, channels = 8, bits = 24, format = 24-bit S-LE PCM uaudio_chan_dump_ep_desc: endpoint=0xfffffe0025c026be bLength=7 bDescriptorType=5 bEndpointAddress=129 bmAttributes=0x5 wMaxPacketSize=312 bInterval=1 bRefresh=0 bSynchAddress=0 uaudio_chan_fill_info_sub: Sample rate = 96000Hz, channels = 8, bits = 24, format = 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=0x01, speed=96000, iface=1 alt=1 uaudio_chan_init: fps=8000 sample_rem=0 uaudio_chan_init: endpoint=0x81, speed=96000, iface=2 alt=1 uaudio_chan_init: fps=8000 sample_rem=0 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=4 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_unit) 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=alsa-kernel.git;a=blob;hb=HEAD;f=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 ! -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, 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>
