Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jan 2010 02:03:01 +0100
From:      Pieter de Goeje <pieter@degoeje.nl>
To:        freebsd-questions@freebsd.org
Cc:        Thomas Hummel <googhummel@gmail.com>
Subject:   Re: Sound (micro-)interrupts with 8.0 stable/snd_hda/mplayer/vlc
Message-ID:  <201001170203.02499.pieter@degoeje.nl>
In-Reply-To: <f21a6851001161017v5e1b3134l1a60ab186340cb40@mail.gmail.com>
References:  <f21a6851001161017v5e1b3134l1a60ab186340cb40@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 16 January 2010 19:17:18 Thomas Hummel wrote:
> Hello,
>
> I'm not really sure what the right list is since I cannot isolate the part
> of
> the system which cause the problem :
>
> I could use a little help on a weird sound issue I'm struggling with :
>
> 1. Description :
> ------------------------
>
>   When playing audio files, the sound has from few to many
> "micro-interrupts"
>   (less than 1/4 of a second), randomly but frequently (so this is not hard
> to
>   reproduce). This seem to occur :
>
>     . with any file (I can pick a random audio file to experience it)
>     . with either mp3 or flaac encoded files
>     . with mplayer (from the ports collection or hand compiled from svn),
>       either with oss or sdl audio output (although sdl seems to have less
> "interrupts")
>     . with vlc
>
>  but
>
>     . not with ffplay
>     . apparently not with xine
>     . apparently not with amarok

Amarok uses xine. All of the above ultimately use OSS to output the sound.

>
> -> so I doubt this may be a harware or a driver issue.
>
> and on a almost idle 4GB RAM machine running only KDE-4 and firefox-3
>
> no hints  shows in /var/log/messages
>
> 2. Config :
> ------------
>
> I'm running :
>
>   . 8.0-STABLE FreeBSD amd64
>
>   . full zfs (no ufs) (files are on a "slow" disk pool (5400 rpm) but
> moving them to the "fast" system disk (7200 rpm) doesn't change anything
>
>   . on a (bios up to date) P5Q3 ASUS motherboard
>
>   . with snd_hda sound driver

[snip]

Try increasing the hw.snd.latency sysctl:

     hw.snd.latency
             Configure the buffering latency.  Only affects applications that
             do not explicitly request blocksize / fragments.  This tunable
             provides finer granularity than the hw.snd.latency_profile tun-
             able.  Possible values range between 0 (lowest latency) and 10
             (highest latency).

Just thinking out loud here, but maybe you have some non-standard HZ 
configured or powerd configured to clock the CPU back by an extreme amount, 
both could theoretically cause buffer underruns.

- Pieter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001170203.02499.pieter>