From owner-freebsd-multimedia@FreeBSD.ORG Wed Jun 15 20:05:18 2011 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD892106564A for ; Wed, 15 Jun 2011 20:05:18 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 617988FC13 for ; Wed, 15 Jun 2011 20:05:18 +0000 (UTC) Received: by wyf23 with SMTP id 23so911141wyf.13 for ; Wed, 15 Jun 2011 13:05:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.184.65 with SMTP id cj1mr23867wbb.51.1308168317131; Wed, 15 Jun 2011 13:05:17 -0700 (PDT) Received: by 10.227.197.209 with HTTP; Wed, 15 Jun 2011 13:05:17 -0700 (PDT) In-Reply-To: <4DF87676.1090303@ladisch.de> References: <201106142156.59630.hselasky@c2i.net> <4DF87676.1090303@ladisch.de> Date: Wed, 15 Jun 2011 22:05:17 +0200 Message-ID: From: Olivier Smedts To: Clemens Ladisch Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org Subject: Re: [uaudio] M-Audio Fast Track Ultra is not recognized, where to start ? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2011 20:05:18 -0000 2011/6/15 Clemens Ladisch : > Olivier Smedts wrote: >> 2011/6/15 Olivier Smedts : >> > 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: at usbus7 uaudio0: 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: 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: 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: 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: 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: on uaudio0 # dmesg | grep uaudio1 uaudio1: 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: on uaudio1 # cat /dev/sndstat FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: pcm0: (play/rec) default pcm1: (play) pcm2: (play) pcm3: (play) pcm4: (play/rec) pcm5: (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: > ), > 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."