LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-02-2007, 01:17 PM   #16
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31

sorry about that. .
i should have gone and looked at the docs before i answered

here are the syntax docs for the .asoundrc

http://www.alsa-project.org/alsa-doc...m_plugins.html

it seems the only other type of plugin to take the same type parameters is dshare
and i think it uses the same mechanism.

a couple of options are a part of dmix that i didn't use in my original (for sblive) file.

channels INT
might help to make only one channel

also might want to bind only one channel ?

bindings { # note: this is client independent!!!
N INT # maps slave channel to client channel N
}
# this also one might do something ?
slowptr BOOL # slow but more precise pointer updates
}
 
Old 05-02-2007, 02:11 PM   #17
bjj2282
LQ Newbie
 
Registered: Apr 2007
Posts: 13

Original Poster
Rep: Reputation: 0
I tried the channels, slowptr, and I took out the bindings, but nothing made a difference. My .asoundrc now looks like:

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

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 64
buffer_size 512
}
}

ctl.dmixer {
type hw
card 0
}


I don't know if this means anything, but today I noticed something else weird about this problem. I tried using the default formats for arecord and aplay and for a minute or so it looked like I fixed it, but then I started seeing overruns. The weird thing is when I change only the rate to 8kHz I start to get overruns instead of underruns and there are much less. Even at 9kHz rate I get underruns just as frequent with the same time in (ms) as I do at 48kHz. I don't know if alsa actually samples at the exact rate that the user enters, but when I enter 8999Hz as the rate I get overruns just like at 8kHz. It must round down or something because why would it give my overruns at 8999Hz and underruns at 9000Hz?
 
Old 05-02-2007, 05:49 PM   #18
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
its very confusing so i don't want to mislead but all i know is (and thats not alot)
when you use dmix plugin (which is what you .asoundrc is doing) all alsa throughput is software resampled to the rate set by the dmix plugin. 48000Hz is the default unless you override in your .asoundrc
this is so lots of different programs can use the sound at the same time all using the same rate.
the conversion is a simple linear interpolation algorithm within alsa that is fast but creates some level of errors.that is ALSA using dmix internally converts everything to 1024 samples per period at 48kHz. ?? i think

i'm not really sure whats going on with the settings in aplay, arecord in relationship to alsa and dmix. I thought in the begining of this thread by using hwplug and setting the buffers and rates we were bypassing any dmix/alsa involvement and setting parameters directly.
perhaps within aplay arecord you are getting software conversion then resampled again in dmix to 48000.

for those of us who use alsa for audio processing we compile alsa against a library called libsamplerate so we get an extra alsa rate plugin
rate 48000
}
rate_converter "samplerate_best"
}
this uses a different better algorithm to do the conversion but its strictly a quality thing.

what i do is mostly just use 44100 so no conversion is needed
i think the equation gets so compilated because the drivers may also be using their own rates.
hardware can be using interupt ticks that can be set in the kernel to run at vastly different rates. the whole thing makes my head spin. its a wonder any of it works at all !
 
Old 05-08-2007, 08:59 AM   #19
bjj2282
LQ Newbie
 
Registered: Apr 2007
Posts: 13

Original Poster
Rep: Reputation: 0
I have been looking into using Jack Audio Connection Kit. Do you know anything about JACK? I have already downloaded JACK 0.103.0, but I am not quite sure what to do from here. I need to cross compile on an i386 arch host for a PPC arch target. The README does not tell me how to configure, build, and install.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with ALSA, no sound through alsa, oss works SB Live! 5.1 Michalxo Linux - Hardware 2 01-21-2007 05:24 AM
kernel-2.6.3 compiled with alsa but xmms alsa output dont plays demmylls Linux - General 3 09-01-2006 04:32 AM
Alsa sound *jumpy*: alsa-space: xrun of at least 11.449 msecs. resetting stream qwijibow Linux - General 6 04-22-2006 07:35 PM
broke gentoo after installing alsa-driver & alsa-utils snakeo2 Linux - Newbie 1 01-26-2006 08:05 AM
ALSA-oss compatability works, but not programs intended for alsa ? qwijibow Linux - Software 5 03-14-2004 07:28 AM


All times are GMT -5. The time now is 07:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration