public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philippe Troin <phil@fifi.org>
To: linux-kernel@vger.kernel.org
Subject: Static with esound (esd) and via82cxxx_audio on 2.4.29.
Date: 02 Mar 2005 13:14:20 -0800	[thread overview]
Message-ID: <87mztlbvir.fsf@ceramic.fifi.org> (raw)

Running 

Linux 2.4.29 #1 SMP Mon Feb 21 02:11:56 PST 2005 i686 unknown

on an Asus K8W SE Deluxe, bios 1005 with an embedded via82cxxx audio
controller:

  00:11.5 Multimedia audio controller: VIA Technologies, Inc. AC97 Audio Controller (rev 60)
        Subsystem: Asustek Computer, Inc.: Unknown device 80b0
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- \
                 ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium \
                >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin C routed to IRQ 22
        Region 0: I/O ports at c800 [size=256]
        Capabilities: [c0] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA \
                       PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Inserting via82cxxx_audio reports:

  Via 686a/8233/8235 audio driver 1.9.1-ac3
  via82cxxx: Six channel audio available
  PCI: Setting latency timer of device 00:11.5 to 64
  via82cxxx: timeout while reading AC97 codec (0xAA0000)
  ac97_codec: AC97 Audio codec, id: ADS112 (Unknown)
  via82cxxx: board #1 at 0xC800, IRQ 22

Playing sound via /dev/dsp works fine, however, when running esound
(esd), I get a lot and endless loop of some audio fragment playing on
the speakers, like if the driver was keeping on playing contents of
the last processed audio buffer.

I've traced it down to the SNDCTL_DSP_POST ioctl, and actually this
source code will reproduce the problem: it will replay the contents of
the "last" submitted audio buffer:

   #include <fcntl.h>
   #include <stdio.h>
   #include <errno.h>
   #include <string.h>
   #include <sys/ioctl.h>
   #include <linux/soundcard.h>
   #include <unistd.h>

   #define CK(args)                                                \
   if ((args) == -1)                                               \
     {                                                             \
       fprintf(stderr, "%s: %s\n", #args, strerror(errno));        \
       exit(1);                                                    \
     }

   int main()
   {
     int fd;

     CK(fd = open("/dev/dsp", O_WRONLY));
     CK(ioctl(fd, SNDCTL_DSP_POST, 0));
     sleep(1);
     return 0;
   }

I've tried backporting 1.9.1-ac4 from 2.6.x, but it has the same
problems.

Phil.

                 reply	other threads:[~2005-03-02 21:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mztlbvir.fsf@ceramic.fifi.org \
    --to=phil@fifi.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox