Date: Tue, 26 Apr 2011 22:27:42 -0300 From: Marcel Bonnet <marcelbonnet@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, Clemens Ladisch <clemens@ladisch.de> Subject: Re: uaudio, M-Audio FastTrack Pro device - sound distorted Message-ID: <BANLkTi=5ubM_azTROu%2BMQ3suWQ_6V57N9w@mail.gmail.com> In-Reply-To: <201104261047.01454.hselasky@c2i.net> References: <BANLkTimAZtcpe2Ba5P0qsHKiH2-G691GCQ@mail.gmail.com> <4DB67DED.1030906@ladisch.de> <201104261047.01454.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 26 April 2011 05:47, Hans Petter Selasky <hselasky@c2i.net> wrote: > On Tuesday 26 April 2011 10:10:21 Clemens Ladisch wrote: > > Marcel Bonnet wrote: > > > I'm using the M-AUDIO FastTrack Pro USB audio interface, but every time > I > > > play or record, the sound get distorted. > > > > > > uaudio0: Play: 44100 Hz, 2 ch, 16-bit S-LE PCM format > > > uaudio0: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format > > > > This device uses one internal sample rate; using different rates for the > > playback and capture interfaces won't work. > > > > AFAIK there are some undocumented constraints on which configurations > > and alternate settings can be used; and in some alternate settings, the > > device uses big-endian samples. This cannot be handled with the generic > > parts of the uaudio driver; it requires device-specific workarounds. > > > > There is an outdated patch that tries to make this device work on Linux > > on this page: > https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3249 > > > > > > Try to set: > > sysctl hw.usb.uaudio.default_rate=44100 > > Then replug the device. > > We could possible make a workaround for this. > Hey, that worked!! (guys, sorry for taking much time for responding, too much busy these days) Thanks, Hans Petter. I made 4 tests for keeping record of the way your trick works, hope it's usefull: (the trick #3 was the best 'cause I don't need to configure every boot) 1) NICE TRICK System booted with snd_uaudio_load="YES" M-AUDIO USB Device is disconnected (turned off) $ sysctl hw.usb.uaudio hw.usb.uaudio.default_channels: 0 hw.usb.uaudio.default_bits: 32 hw.usb.uaudio.default_rate: 0 hw.usb.uaudio.debug: 0 $ sudo sysctl hw.usb.uaudio.default_rate=44100 hw.usb.uaudio.default_rate: 0 -> 44100 M-AUDIO USB Device is now connected $ audacious The same MP3 (128kbps 44100 Hz) now played very clean. Sounds perfect. Closed the application. $ sudo sysctl hw.usb.uaudio.default_rate=0 hw.usb.uaudio.default_rate: 44100 -> 0 $ audacious The same MP3 still playing perfect. Closed the application. 2) NICE TRICK Another test, but the system maintains the last statet (not rebooted) M-AUDIO USB Device was disconnect (turned off) $ audacious The same MP3 sounds distorted. Closed the application. $ sudo sysctl hw.usb.uaudio.default_rate=44100 hw.usb.uaudio.default_rate: 0 -> 44100 $ audacious The same MP3 sounds distorted. Closed the application. 3) NICE TRICK System rebooted with snd_uaudio_load="YES" M-AUDIO USB Device is connected (powered on) Added entry to /boot/loader.conf: hw.usb.uaudio.default_rate=44100 $ dmesg | grep uaudio uaudio0: <FastTrack Pro> on usbus0 uaudio0: Play: 44100 Hz, 2 ch, 16-bit S-LE PCM format uaudio0: Record: 44100 Hz, 2 ch, 16-bit S-LE PCM format uaudio0: MIDI sequencer pcm0: <USB audio> on uaudio0 * without setting the default_rate the device announces itself as 44100 Hz for playback, 48000 for recording $ sysctl hw.usb.uaudio hw.usb.uaudio.default_channels: 0 hw.usb.uaudio.default_bits: 32 hw.usb.uaudio.default_rate: 44100 hw.usb.uaudio.debug: 0 $ audacious The same MP3 still playing perfect. Closed the application. 4) THE PROBLEM * The same happens if I don't change the default_rate. System rebooted with snd_uaudio_load="YES" M-AUDIO USB Device is connected (powered on) $ sysctl hw.usb.uaudio hw.usb.uaudio.default_channels: 0 hw.usb.uaudio.default_bits: 32 hw.usb.uaudio.default_rate: 0 hw.usb.uaudio.debug: 0 $ sudo sysctl hw.usb.uaudio.default_rate=44100 hw.usb.uaudio.default_rate: 0 -> 44100 $ audacious The same MP3 sounds distorted. Closed the application. -- Marcel Bonnet > > --HPS > * *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTi=5ubM_azTROu%2BMQ3suWQ_6V57N9w>