weird sound problem requires odd config tweak

From: yussef (yussef_at_claygirl.org)
Date: 06/16/03

  • Next message: Terry Lambert: "Re: kqueue alternative?"
    To: freebsd-hackers@freebsd.org
    Date: Sun, 15 Jun 2003 21:24:27 -0700
    
    

    Im running 4.8 on my Laptop, with the following sound hardware:

    # dmesg |grep pcm
    pcm0: <SiS 7018> port 0x3400-0x34ff mem 0x24003000-0x24003fff irq 5 at
    device 1.4 on pci0 pcm0: <Asahi Kasei AK4543 ac97 codec>

    I have 'device pcm' compiled into the kernel and thats all ive done to
    enable sound.
    The first time i went to play an mp3 [with xmms] it started playing
    fine...for the first 11 seconds. Then it just stopped. For a while i was
    not able to get sound working, for more than 11 seconds. And after it
    plays that initial 11 seconds, i cannot get it to play at all again, but
    if i were to reboot, it would again play for 11 seconds, only on the
    first try. [initially it always seemed to play for exactly 11 seconds.
    this doesnt seem to be the case anymore, but it does generally seem to
    be the most predictable value, and it never has played over the 11
    seconds].

    Eventually i did figure out some ways to get audio playing. Ive narrowed
    it down to a relatively quick and simple few steps to get audio working
    quite reliably. Worth noting is that video [such as playing a dvd of a
    vid from my hard drive] seemed to suffer from this same issue. But when
    i configure the audio to work, the video then also plays fine.
    the steps i take to get audio working are as follow:

    1)start xmms [in theory this could probably be another audio app, but
    ive stuck with using xmms in this process]
    2)play an audio file until it stop [<=11 seconds]
    3)once the audio has stopped close xmms [click on 'x' to close] i close
    xmms directly. ive found that stopping it first can either yield this
    prodecure useless and/or force xmms to freeze, requiring a killall xmms
    to get rid of the process.
    4)now i set a couple sysctl's:
    #hw.snd.maxautovchans=4
    hw.snd.maxautovchans: 0 -> 4
    #hw.snd.pcm0.vchans=4
    hw.snd.pcm0.vchans: 1 -> 4
    ive also used 5 for the above values, and it seems to work equally well.
    so i assume the actual value isnt overly important.
    5) fire up xmms. it will complain about audio device not being
    available. going into xmms options and changing the sound device to a
    new vchan will fix this. and now xmms will play fine[as well as other
    a/v apps].

    a few other things to note:

    # fstat |grep dsp
    luser xmms 386 11 / 1591 crw-rw-rw- dsp0.3 w
    luser xmms 370 11 / 1590 crw-rw-rw- dsp0.2 w

    it appears that sound requires a zombie process to be running otherwise
    it will not work. I tried different steps than the above mentioned ones,
    such as setting the sysctl values at bootup, but if that zombie process
    doesnt exist it doesnt seem to work.
    an alternative to the zombie process is this:
    i can open up xmms and play a song. when it stops playing just keep xmms
    open. then run mplayer and play a video, and it will play fine. however,
    xmms will not be able to play anything. [i can also reverse this
    procedure, and use mplayer to get xmms to play].

    sound works fine under windows 2000 and linux.

    I am not sending this email so much because i want a solution, because
    the solution i stated above works well enough. But it seems like an odd
    problem, and beyond my level of knowledge to properly debug and attempt
    to fix. If this problem is already a known issue, i apologize, and
    please just point me in the right direction. Otherwise im more than
    willing to do whatever i can to help debug this problem, if it peaks
    anyones interest, or they have an idea of whats causing the problem.

    thank you for your time
    yussef
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Terry Lambert: "Re: kqueue alternative?"

    Relevant Pages

    • Re: /dev/cdrom question
      ... there are two ways of playing audio CDs. ... > the volume bar on the player itself, one being the volume icon in the tray ... > different option I can access from the sound and video menu. ... Can you play sound files on the hard disk? ...
      (Fedora)
    • Re: Does anyone fancy a challenge?
      ... Going to the next tab in hte applett shows I have a sound scheme selected, ... howver when I try to play a sound the little play button next to the file ... My DVD's play video in powerdvd but do not play audio. ...
      (microsoft.public.windowsxp.general)
    • Re: [SLE] absolute strangest audio problem
      ... configure the card *once* with YaST and then leave it alone. ... your sound setup. ... audio at the end of the setup failed to play and i couldn't play audio ...
      (SuSE)
    • Re: Playing Music CDs
      ... > play them today, but couldnt mount my /cdrom drive. ... Go to Xmms preferences and configure the "cd audio player" plugin. ...
      (freebsd-questions)
    • Re: Sound on SiS 7012 under 4.8 ?
      ... I have a laptop with the 7018 sis audio chipset. ... perform a lil tinkering to get sound working. ... with xmms, i find i have to open up the app, then set both thos sysctl ... usually induce the zombie process]. ...
      (freebsd-questions)

  • Quantcast