# Strange sound problem



## Miax (Sep 20, 2011)

I've installed mplayer for video playback with a USB DAC called HRT Music Streamer II.(This is an asynchronous USB DAC, but it seems FreeBSD doesn't support USB asynchronous mode for sound devices and the sampling rate is strangely fixed to 96000) When I play a video file, first and second playback was flawless but after that there is no more sound. After rebooting, the problem was still there. First and second or if possible at most third playback was ok, and then no sound. 

The mplayer has four audio output driver options available, namely oss, mpegpes, null and pcm, but the only driver which brings sound(at least first and second playback) was oss. With the pcm driver the video is played much faster than it should be. 

Though mplayer played the video mute, there are no error messages and it plays the audio file. I have no idea. 

Sysctl settings :

```
dev.pcm.0.%desc: USB audio
dev.pcm.0.%driver: pcm
dev.pcm.0.%parent: uaudio0
dev.pcm.0.play.vchans: 1
dev.pcm.0.play.vchanmode: fixed
dev.pcm.0.play.vchanrate: 96000
dev.pcm.0.play.vchanformat: s16le:2.0
dev.pcm.0.buffersize: 0
dev.pcm.0.bitperfect: 0
```


```
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.feeder_rate_quality: 4
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 96000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.vpc_mixer_bypass: 1
hw.snd.verbose: 0
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0
```


```
dmesg | grep uaudio
uaudio0: <[url]www.hirestech.com[/url] 2010 REV 1.7 Music Streamer II, class 0/0, rev 1.10/0.03, addr 3> on usbus2
uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format
uaudio0: No recording!
uaudio0: No midi sequencer
pcm0: <USB audio> on uaudio0
uaudio0: <[url]www.hirestech.com[/url] 2010 REV 1.7 Music Streamer II, class 0/0, rev 1.10/0.03, addr 3> on usbus2
uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format
uaudio0: No recording!
uaudio0: No midi sequencer
pcm0: <USB audio> on uaudio0
uaudio0: <[url]www.hirestech.com[/url] 2010 REV 1.7 Music Streamer II, class 0/0, rev 1.10/0.03, addr 3> on usbus2
uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format
uaudio0: No recording!
uaudio0: No midi sequencer
pcm0: <USB audio> on uaudio0
uaudio0: <[url]www.hirestech.com[/url] 2010 REV 1.7 Music Streamer II, class 0/0, rev 1.10/0.03, addr 3> on usbus2
uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format
uaudio0: No recording!
uaudio0: No midi sequencer
pcm0: <USB audio> on uaudio0
uaudio0: <[url]www.hirestech.com[/url] 2010 REV 1.7 Music Streamer II, class 0/0, rev 1.10/0.03, addr 3> on usbus2
uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format
uaudio0: No recording!
uaudio0: No midi sequencer
pcm0: <USB audio> on uaudio0
uaudio0: at uhub4, port 2, addr 3 (disconnected)
uaudio0: <[url]www.hirestech.com[/url] 2010 REV 1.7 Music Streamer II, class 0/0, rev 1.10/0.03, addr 3> on usbus2
uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format
uaudio0: No recording!
uaudio0: No midi sequencer
pcm0: <USB audio> on uaudio0
```


----------



## aragon (Sep 21, 2011)

If you recompile your USB modules with USB_DEBUG defined, you can try set your default bitrate to 48000 Hz.  Once your new modules are installed, add this to /boot/loader.conf:


```
hw.usb.uaudio.default_bits=16
hw.usb.uaudio.default_rate=48000
```

(and then reboot)


----------

