LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   non continous audio problem (https://www.linuxquestions.org/questions/linux-newbie-8/non-continous-audio-problem-388690/)

morningkiran 12-02-2005 01:38 PM

non continous audio problem
 
Iam using fedora core3 and has just shifted to fedora core 4 but there was new problem. when I play an audio file in xmms or mplayer it doesnot play continously it just plays for 3 or 4secs and stops for 2 secs or so and then continues ... i donnot what the problem is?? so i switched back to fedora core 3 again but the problem persisted. I have 512 mb ram with 2.2 GHZ processor and intel 845 motherboard. Please help me.
thanks in advance,
uday.

foo_bar_foo 12-02-2005 02:37 PM

all i know is alsa uses a ring or circular buffer
i would assume yours needs to be smaller to address non-contiguous problem
try in your .asoundrc messing with various combinations of these settings and see if yyou can't get it to run right.
Code:

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

pcm.dmixer  {
        type dmix
        ipc_key 1024
        slave {
            pcm "hw:0,0"
        #  period_time 0 # set to 0 lets period size and buffer size do everything
            period_time 2 # this is the general standard even though often is set to 0
        #  period_time 84000
        #  period_size 512
            period_size 1024 # oss period frames this is the one shown as hardware
        #  period_size 2048
        #  period_size 4096 # not great to go over this
        #  buffer_time 340000
        #  buffer_size 16384 # this is the one shown as hardware but causes huge mess
        #  buffer_size 8192
        #  buffer_size 4096
            buffer_size 2052 # this is the one i use
            rate 44100 # can let card decide this on it's own this one is what hardware says
        #  rate 48000

        }
        bindings {
            0 0
            1 1
        }
    }

pcm.dsp {
    type plug
    slave.pcm "dmixer"
}

pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}


morningkiran 12-02-2005 03:39 PM

i dont have any clue of what you are talking about plase explain ,,
thanks uday.

foo_bar_foo 12-02-2005 10:34 PM

sorry
take the script i posted above and name it .asoundrc and put it in your home directory
and test
the symbols "#" in the script are commented out lines, that is, those lines have no effect
so you can play with the various values by doing or undoing the leading "#" symbol


theory
the sound buffer used by alsa is circular like a snake eating it's own tail.
stuff gets written to the buffer of a certain size in chunks of a certain size and then the the read comes around behind and plays what it finds. around in a circle like an old record

presumably your buffer is not getting full and the read runs out of stuff to play and makes a blank space.
a smaller buffer might make it so there is no longer a gap.

morningkiran 12-02-2005 11:50 PM

I have tried various option ..with the code you have given but the same problem persists...
I observed this is happening when i tried to open a new window on my browser or a command that takes lot of cpu. please suggest a solution.
thanks in advance,
uday

foo_bar_foo 12-03-2005 04:38 PM

ok -- i see
try this
as root type the command
lspci -v
then in the list find your sound card
there will be a section for your soundcard like (mine)
Code:

02:0a.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 0a)
        Subsystem: Creative Labs: Unknown device 8067
        Flags: bus master, medium devsel, latency 248, IRQ 22
        I/O ports at df80 [size=32]
        Capabilities: [dc] Power Management version 1

OK the thing we are concerned about is latency setting
the reference number for the next command involves the first thing "02:0a.0"
for me -- so you adjust the command to reflect what yours says
try this command as root and see if it helps
setpci -v -s 02:0a.0 latency_timer=ff

morningkiran 12-04-2005 09:07 AM

I tired as you said the device it has shown is

00:1f.5 Multimedia audio controller: Intel Corp. 82801DB (ICH4) AC'97 Audio Controller (rev 01)
Subsystem: Intel Corp.: Unknown device 0208
Flags: bus master, medium devsel, latency 0, IRQ 3
I/O ports at e400
I/O ports at e080 [size=64]
Memory at ffa7f800 (32-bit, non-prefetchable) [size=512]
Memory at ffa7f400 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2
then i tried setpci.....
but it did not solve the problem ...
what I observed is that the sound stops when I tried to so some thing like type a command at the command prompt or try to open a new window in the browser or some thing like that. please help.
thanks in advance,
uday.

morningkiran 12-04-2005 09:57 AM

I have installed vlc,Realplayer and mplayer on my system but all the four have same problem is there any thing rong in my hardware ...please help me.
thanks uday.

foo_bar_foo 12-04-2005 09:26 PM

perhaps we overlooked the simple solution
show us the output from
ps -C esd
if there is a process esd then
disabled sound at startup from the Gnome control center
restart gnome and see if sound works better

morningkiran 12-05-2005 02:24 AM

I did not Install Gnome
 
Mr. foo
I did not install Gnome but i have installed KDE and later Windowmaker.
This is small problem but very irritating to pause and start the audio or video every time it stops.Please help. Should I revert back to my earlier version or try someother distro like Suse or mandrake.
thanks for your innterest,
uday.


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