Audio

Plugging in devices such as LAN adapters, Wi-Fi cards, printers, etc. to Arch Linux ARM.

Re: Audio

Postby falker » Wed Sep 22, 2010 8:33 pm

For anyone experiencing problems with mpd and $1 48khz usb cards:

mpd has to resample the usually 44.1khz music to 48khz. This can be very cpu-intensive depending on the chosen sampler.

mpd.conf
$this->bbcode_second_pass_code('', '
audio_output_format "48000:16:2"
samplerate_converter "ZOH Interpolator"
')

The zoh resampler is reasonable fast on the dockstar, the default will result in very slow playback and 100% cpu load.
falker
 
Posts: 24
Joined: Sat Jul 10, 2010 2:45 pm

Re: Audio

Postby blurry » Fri Sep 24, 2010 4:54 am

I was able to play mp3s with "mpg123" with no interpolation issue -- I didn't check CPU consumption but there was no audible popping or crackling that I could determine. I was using a Turtle Beach USB audio advantage micro that I had lying around.
blurry
 
Posts: 17
Joined: Tue Aug 31, 2010 2:52 pm

Re: Audio

Postby LaTristesse » Sat Nov 20, 2010 6:27 pm

I'm able to play mp3-files but only with crackle. My Audio-Interface is class compilant. I've searched for the asound.conf but there is no such file.

$this->bbcode_second_pass_code('', '**** List of PLAYBACK Hardware Devices ****
card 0: UA25EX [UA-25EX], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0')

Any suggestions?
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm

Re: Audio

Postby tno » Sat Nov 20, 2010 11:03 pm

create that file with the contents I described.
tno
 
Posts: 5
Joined: Thu Aug 26, 2010 1:02 pm

Re: Audio

Postby LaTristesse » Sun Nov 21, 2010 12:12 am

Allready tried that with no success.
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm

Re: Audio

Postby tno » Sun Nov 21, 2010 11:35 am

Did you try checking the contents of $this->bbcode_second_pass_code('', '/proc/asound/card0/pcm0p/sub0/hw_params')?
Do they make sense?

If you have high cpu load, make sure that your player uses the same sampling rate as your soundcard.
If your playing files that are encoded with 44,1khz but your soundcard only supports 48khz, the CPU might be too slow to play without distortions.
tno
 
Posts: 5
Joined: Thu Aug 26, 2010 1:02 pm

Re: Audio

Postby LaTristesse » Tue Nov 23, 2010 9:08 pm

It works. I'm feeling lucky. I've no clue why it doesnt run at first time. Thank you.
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm

Re: Audio

Postby peaslaker » Wed Dec 22, 2010 8:48 pm

$this->bbcode_second_pass_code('', '
pcm.!default {
type plug
slave.pcm "front:CARD=Speaker"
}
')
peaslaker
 
Posts: 101
Joined: Tue Sep 07, 2010 10:40 pm

Re: Audio

Postby shellwig » Wed May 04, 2011 1:41 am

For those that are interested I got one of these cheap USB audio adapters to work on my Dockstar running Arch Linux ARM.
http://www.geeks.com/details.asp?invtid=CL-USCM2&cat=SND
Image
It took a bit of tweaking to get rid of the pops and skips with mpd, than a bit more to get the processor usage down. After a few attempts to get mpd going I tried mpg123 and it was fine so I knew it was only a matter of time, I think it might have worked out of the box but I can not be sure.
  • mpg123 utilization is fairly steady at 1-2%
  • playing locally mpd runs in the 12-16% range
  • streaming mpd using the native httpd sits right around 95%, but is clean, no buffering problems.
I doubt I will stream much I just wanted to get it working, I played with the quality setting, 1.0 still sounds good and brought the cpu usage down from around 99%. I messed with the format settings for the outputs, in verbose mode the log did not show what I expected and impacted the cpu too much to make me give up any extensive testing once I found settings that worked.
I only attached a set of laptop speakers to the Dockstar not my stereo but I have no complaints about the sound quality.

asound.conf
$this->bbcode_second_pass_code('', 'defaults.pcm.dmix.rate 44100 # Force 44.1 KHz
defaults.pcm.dmix.format S16_LE # Force 16 bits
pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}
')
mpd.conf
$this->bbcode_second_pass_code('', '
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:24:2" # optional
mixer_type "hardware" # optional
mixer_device "default" # optional
mixer_control "PCM" # optional
mixer_index "0" # optional
enabled "yes"
}
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "vorbis" # optional, vorbis or lame
port "8000"
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
quality "1.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
format "44100:24:1"
max_clients "2" # optional 0=no limit
enabled "no"
}
samplerate_converter "3"
')
shellwig
 
Posts: 6
Joined: Tue May 03, 2011 10:43 pm

Re: Audio

Postby bedek » Mon Sep 12, 2011 2:16 pm

Please correct me if I'm wrong:
- most of MP3 file are encoded in 44.1 khz
- if mpd play such file it would be possible to change configuration interpolator values to one of these: Best Sinc Interpolator (0), Medium Sinc Interpolator (1), Fastest Sinc Interpolator (2) and Dockstar should be capable to play them smoothly ?

In my case I've 48khz cheap card which allows me to use only: ZOH Interpolator (3) and Linear Interpolator (4).

$this->bbcode_second_pass_quote('', 'F')or anyone experiencing problems with mpd and $1 48khz usb cards:

mpd has to resample the usually 44.1khz music to 48khz. This can be very cpu-intensive depending on the chosen sampler.

mpd.conf
bedek
 
Posts: 1
Joined: Mon Sep 12, 2011 1:52 pm

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 2 guests