AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › bit perfect USB audio under linux?
New Posts  All Forums:Forum Nav:

bit perfect USB audio under linux?

post #1 of 13
Thread Starter 
I am trying to make a fanless/driveless laptop for audio playback, and it would be much easier to do this using some livecd remaster than with BartPE-d Windows.

On the windows part, I know to get bit perfect audio out of a USB soundcard, you need to use asio4all or usb-audio asio or kX project drivers, just because windows is forcing kmixer resampling from 44100 to 48000.

Under linux, is it possible to use a standard USB audio car (i mean not a complicated Creative/E-Mu card, just a genetic usb audio card) to get bit-perfect playback, for example to get DTS output on a usb interface?

Does it depend on the audio application, or the driver in use?
post #2 of 13
I just tried a USB sound card, a simple generic unit with optical SPDIF out plus headphone and mic analog, on Ubuntu 6.1 on a P4B533/P4 2.4Ghz mobo/cpu, booting from the CD.

The USB sound card was detected fine, but testing with a DTS audio CD, the RythmBox player would lock up trying to play the CD. Trying several times, once my Pioneer 1014 receiver locked on and I heard the music briefly, then nothing.

I then connected the coax SPDIF out from the Maudio Ap 24/96 PCI card in the same machine, and could not get anything out over SPDIF. I could hear white/pink noise over the analog outs, which is what you should hear with a DTS CD over analog (or non-bit perfect SPDIF), but no DTS PCM stream.

I get bit perfect from my Chaintec AV710 in one machine and MSI 6150 mobo with Realtek ALC880 chip on it in another, both on XP Pro.

Getting bit perfect audio out should be a non-issue in 2007. I don't know why this issue hasn't been stomped out across the board yet, especially with a major distro like Ubuntu...

This has got to be the #1 recurring issue re: audio on media PC's, on any OS. I don't know why the bit perfect issue just won't get solved once and for all- considering that any $20 DVD player can output bit perfect PCM from audio CD's (i.e. uncorrupted DTS PCM from DTS CD's), jitter issues aside.

We need to make this known on the Ubuntu forums so the next release or two will enable bit perfect 44.1Khz PCM, with auto switching between 44.1 and 48Khz for audio CD's vs DVD playback (DD/DTS streams on DVD are 48Khz).

Both my XP Pro machines auto switch 44.1/48Khz- I play 44.1Khz CD's in foobar2000 using kernal streaming via SPDIF out, and can close foobar, open PowerDVD 6 and play a DVD with DD/DTS out over SPDIF, no settings need to be changed. This is how it needs to work- no settings dialogs allowed for 44.1 vs 48Khz.
post #3 of 13
Don't get me wrong- even with my ranting in my last post, I believe Linux has graduated from the one-step-forward, two-steps-back phase to two-steps-forward, one-step-back re: being ready for prime time for media PC/HTPC mainstream deployment .

I believe Ubuntu is ready for the desktop for most average non-gamer users (your mom ), and is very close for an all purpose OS for media PC's for non_MCE style users like myself. Those who prefer MCE-style interfaces have Freevo and Myth already.

Anyone getting bit perfect from a KnoppMyth box?
post #4 of 13
Who do we complain to? The Ubuntu guys? The Linux kernal maintainers? The ALSA or OSS sound API guys?
post #5 of 13
Quote:
Originally Posted by Rgb View Post

I get bit perfect from my Chaintec AV710 in one machine and MSI 6150 mobo with Realtek ALC880 chip on it in another, both on XP Pro.

Getting bit perfect audio out should be a non-issue in 2007. I don't know why this issue hasn't been stomped out across the board yet, especially with a major distro like Ubuntu...

This has got to be the #1 recurring issue re: audio on media PC's, on any OS. I don't know why the bit perfect issue just won't get solved once and for all- considering that any $20 DVD player can output bit perfect PCM from audio CD's (i.e. uncorrupted DTS PCM from DTS CD's), jitter issues aside.

Ok, what exactly are you referring too here, I guess I don't understand what you mean by "bit perfect"? I use the AV-710 in my Linux HTPC under debian and have no problem with using the SPDIF port with either CD's or DVD's outputting DTS.
post #6 of 13
Quote:
Originally Posted by bac522 View Post

Ok, what exactly are you referring too here, I guess I don't understand what you mean by "bit perfect"? I use the AV-710 in my Linux HTPC under debian and have no problem with using the SPDIF port with either CD's or DVD's outputting DTS.

I assume you have red book DTS CD's you play via SPDIF on the Chaintec AV710? And your receiver/processor recognizes the DTS stream?

I apologize- my comment you highlighted was not very clear. My PC's with the Chaintec AV710 and Realtek ALC880 run XP PRo- I have not tested either machine with Linux (Ubuntu 6.1 or any other distro).

I only tested the P4B533/P4 box with M-Audio Ap 24/96 card, as well as the same box with a generic USB sound card, under Ubuntu 6.1.

I will try Ubuntu 6.1 on the box with RealTek ALC880 and the other box with Chaintec AV710 and see if I get an uncorrupted DTS stream from my DTS CD's (which I interpret as "bit perfect").

What settings under Linux do you use- i.e. Volume control/mixer settings?
post #7 of 13
I can't say I'm a guru in this subject. I was referring to regular CD's so I went here http://www.kellyindustries.com/sounds.html and download some of the files. They played through my HTPC with no problem and were clearly DTS since the light on my AV receiver indicated that they were DTS files. The couple of DVD-A files I own played fine as well too.

I'm not sure my mixer settings have anything to do with it. I use ALSA and my .asoundrc file is the following:

./.asoundrc

# Set default sound card
# Useful so that all settings can be changed to a different card here.
pcm.av710spdif {
type hw
card 0
device 1
}

pcm.!default {
type plug
slave.pcm "duplex"
}

pcm.monitor {
type plug
ttable.0.10 1 # digital mix left
ttable.1.11 1 # digital mix right
slave.pcm "av710spdif"
}

# Allow mixing of multiple output streams to this device
pcm.output {
type dmix
ipc_key 1024
ipc_perm 0660 # Sound for everybody in your group!
slave.pcm "av710spdif"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
format S32_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}

bindings {
0 0
1 1
}
}

# Allow reading from the default device.
# Also known as record or capture.
pcm.input {
type dsnoop
ipc_key 2048
slave.pcm "av710spdif"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
format S32_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}

bindings {
0 0
1 1
}
}

# This is what we want as our default device
# a fully duplex (read/write) audio device.
pcm.duplex {
type asym
playback.pcm "output"
capture.pcm "input"


--------------------------------------
The following is the output from amixer
amixer
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 14 [45%] [on]
Front Right: Playback 14 [45%] [on]
Simple mixer control 'Master Mono',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 31
Mono: Playback 0 [0%] [off]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off]
Front Right: Playback 0 [0%] [off]
Simple mixer control '3D Control - Center',0
Capabilities: volume volume-joined
Playback channels: Mono
Limits: 0 - 15
Mono: 0 [0%]
Simple mixer control '3D Control - Depth',0
Capabilities: volume volume-joined
Playback channels: Mono
Limits: 0 - 15
Mono: 0 [0%]
Simple mixer control '3D Control - Switch',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'PCM',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 23 [74%] [on]
Front Right: Playback 23 [74%] [on]
Simple mixer control 'Surround',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off]
Front Right: Playback 0 [0%] [off]
Simple mixer control 'Center',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [off]
Simple mixer control 'LFE',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 31
Mono: Playback 0 [0%] [off]
Simple mixer control 'Line',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'CD',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 0 [0%] [off]
Front Left: Capture [on]
Front Right: Capture [on]
Simple mixer control 'Mic Boost (+20dB)',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Mic Select',0
Capabilities:
Mono:
Simple mixer control 'Video',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Phone',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 0 [0%] [off]
Front Left: Capture [off]
Front Right: Capture [off]
Simple mixer control 'IEC958',0
Capabilities:
Mono:
Simple mixer control 'IEC958 Output',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',1
Capabilities:
Mono:
Simple mixer control 'PC Speaker',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 15
Mono: Playback 0 [0%] [off]
Simple mixer control 'Aux',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Mono Output Select',0
Capabilities:
Mono:
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 15
Front Left: Capture 0 [0%] [on]
Front Right: Capture 0 [0%] [on]
Simple mixer control 'Mix',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Front Left - Front Right
Front Left: Capture [off]
Front Right: Capture [off]
Simple mixer control 'Mix Mono',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Front Left - Front Right
Front Left: Capture [off]
Front Right: Capture [off]
Simple mixer control 'Alternate Level to Surround Out',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Downmix LFE and Center to Front',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Downmix Surround to Front',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'External Amplifier',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'H/W',0
Capabilities:
Mono:
Simple mixer control 'H/W',1
Capabilities:
Mono:
Simple mixer control 'Multi Track Internal Clock',0
Capabilities:
Mono:
Simple mixer control 'Multi Track Peak',0
Capabilities: volume
Playback channels: Front Left - Front Right - Front Center - Rear Left - Rear Right - Woofer - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ?
Limits: 0 - 255
Mono: 0 [0%]
Front Left:
Front Right:
Front Center:
Rear Left:
Rear Right:
Woofer:
?:
?:
?:
?:
?:
?:
?:
?:
?:
?:
?:
?:
?:
?:
?:
?:
Simple mixer control 'Multi Track Rate Locking',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Multi Track Rate Reset',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
post #8 of 13
For the record, the USB sound card I tried had a C-Media chip in it.
post #9 of 13
bac522- thanks for the data.

What media player did you use to output the DTS audio files?
post #10 of 13
I tested Ubuntu 6.1 on my A64 3500 rig with Realtek ALC880 audio chip, and I couldn't get DTS .wavs to play via SPDIF out to my receiver.

The OS booted fine from the CD, and the ALC880 appeared fine in the SOund preferences and Volume control applets.

But neither RythmBox nor the default audio player that came up when I double clicked the .wav file (can't recall the name of the default wav player) would send out uncorrupted PCM via SPDIF.

I rebooted back to Xp Pro on the hard disk, changing nothing on the machine other than removing the Ubuntu CD, and double clicked the same wav file. My receiver immediately recognized the stream as DTS.

I did not try changing any of the config file parameters listed in the post above. I suspect it may have to do with setting 44.1Khz default vs 48Khz, or maybe some other setting related to mixer or SPDIF output, but I am only guessing.

I hope the April Ubuntu release enables bit perfect SPDIF by default with the default audio players.
post #11 of 13
Quote:
Originally Posted by Rgb View Post

bac522- thanks for the data.

What media player did you use to output the DTS audio files?


I used xmms and mplayer. I use Debian as my distro. I'm guessing the latest version of Ubuntu use ALSA as it's sound driver, but I'd put money on it that it's defaulting too the analog port in which case that is where .asoundrc file comes into play.

But if Ubuntu is using ALSA then you should have the ASLA command set. From a shell what is the output of aplay -l (barring Ubuntu is using ALSA)? Mine is:


./aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AV710 [Chaintech AV-710], device 0: ICE1724 [ICE1724]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AV710 [Chaintech AV-710], device 1: IEC1724 IEC958 [IEC1724 IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: SI7012 [SiS SI7012], device 0: Intel ICH [SiS SI7012]
Subdevices: 1/1
Subdevice #0: subdevice #0

You could then try using the following aplay command "aplay -D plughw:0,1 [file name.wav]" In my case hw:0,1 tells aplay to use "card 0: AV710 [Chaintech AV-710], device 1: IEC1724 IEC958 [IEC1724 IEC958]" which happens to be the spdif port.
post #12 of 13
Ok, I'm clearly getting bit-perfect playback out of my Chaintech AV-710 and after learning that DTS CD's exist I've been suckered into buying a couple of DTS CD's; Stings Ten Summoner's Tales (DTS Edition) and Stings Brand New Day and all I can say is wow!

Listing to regular CD's is going to be hard going forward!!! This is one thing I love about HTPC is the versatility of them.
post #13 of 13
your passthrough digital problems are a result of the realtek 880 chipset unfortunately. I have the 882 on my asus mobo and I can't pass streams through to my receiver. This appears to be a bug listed on the ALSA bugzilla page. I have gotten around it by buying a turtle beach advantage micro 5.1 to pass the signals through. Works fine, but I'm still waiting for them to fix the bug. It's been since October that I've known about it.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: HTPC - Linux Chat
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › bit perfect USB audio under linux?