[LAU] Re: Pops and clicks but no xruns

Karl Hammar karl at aspodata.se
Sun Apr 8 07:38:34 EDT 2007


Andrew Burgess <aab at cichlid.com>:
> Paul Davis wrote:
> >> What could cause clicks without xruns? I'm baffled.
> >PCI bus hogging, for one thing. consider running a script like this
...
> Here one that works automatically for all multimedia devices:
> # find multimedia devices
> pcis=$(lspci -v | grep Multimedia | awk '{ print $1; }')
> if test -z "$pcis"; then
>   echo WARNING: no multimedia devices found on pci bus
> else
>   for p in $pcis; do
>     echo set maximum latency timer for $p
>     setpci -s $p latency_timer=ff
>   done
> fi

It does not work for me:

  $ lspci  | grep Multi | head -1 | cut -b-75
  0000:00:05.0 Multimedia audio controller: nVidia Corporation nForce MultiMe
  $ setpci -s 0000:00:05.0 latency_timer
  lspci: -s: Invalid slot number
  $ setpci -s 00:05.0 latency_timer
  00

I have to remove the first 0000: from lspci, as in:

  $ cat /usr/local/sbin/pci.set.audio
  #!/bin/sh

  val=${1:-ff}
  # find multimedia devices
  pcis=$( lspci -n | grep ' 0401: ' | cut -f1 -d\  | cut -f2- -d: )
  if test -z "$pcis"; then
    echo WARNING: no multimedia devices found on pci bus
  else
    for p in $pcis; do
      lspci -s $p
      echo -en \\tmaximum latency timer:\ 
      setpci -s $p latency_timer | tr -s ' \n' ' '
      setpci -s $p latency_timer=$val > /dev/null
      echo -n '-> '
      setpci -s $p latency_timer
    done
  fi
  $

Though all devices does not change:

  # pci.set.audio | cut -b-68
  0000:00:05.0 Multimedia audio controller: nVidia Corporation nForce 
	  maximum latency timer: 00 -> 00
  0000:00:06.0 Multimedia audio controller: nVidia Corporation nForce2
	  maximum latency timer: 00 -> 00
  0000:01:09.0 Multimedia audio controller: VIA Technologies Inc. ICE1
	  maximum latency timer: 00 -> f8
  #

Regards,
/Karl

-----------------------------------------------------------------------
Karl Hammar                    Aspö Data               karl at aspodata.se
Lilla Aspö 2340                                                Networks
S-742 94 Östhammar          +46  173 140 57                   Computers
Sweden                     +46  70 511 97 84                 Consulting
-----------------------------------------------------------------------





More information about the Linux-audio-user mailing list