All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve deRosier <derosier@pianodisc.com>
To: alsa-devel@lists.sourceforge.net
Subject: Pops at start of song
Date: Wed, 19 Nov 2003 14:15:20 -0800	[thread overview]
Message-ID: <3FBBEB78.3030706@pianodisc.com> (raw)

All,

We're having a problem with some of our audio applications.  When a song 
starts playing we will often hear a loud pop out of the speakers before 
it plays audio.  It seems dependent upon where we stoped and the specfic 
content of the last song, if we hit our "stop control" and abort in the 
middle of the song it may pop uppon restarting or starting a new song.

One of our engrs found if he fills the entire buffer with zeros before 
quitting the program, on the next start it won't pop (though that moves 
the pop to the end of the previous due to a disconnect/jump in the 
created waveform).  Unless this is a hardware issue, this doesn't seem 
to be the right solution to me.  So:

* What are things that we can do in our program using the alsa pcm 
functions to eliminate this?  Maybe a specific function we need to call 
or a particular sequence?
* Or, is this something inherent in hardware and other than filling with 
zeros before we quit there's nothing we can do?

I figure some of you have encountered this before, so maybe there's some 
ideas out there?

If you're wondering what we do when a "stop" command comes in: pretty 
much nothing.  Basically my "ALSASender" routine ends and calls:
void CDSP::ClosePCM( void )
{
   // some other bookkeeping goes here <snip>

   snd_pcm_close( hPCM );

   if( mPCMStatus )
   {
      snd_pcm_status_free( mPCMStatus );
      mPCMStatus = NULL;
   }

   // Non-alsa related cleanup goes here <snip>
}

Also, note that we do get the same pops with using aplay.

Thanks,
- Steve

PS Takashi -> I haven't given up on my serial driver patch, I was 
working on it when I got interupted with something else, it should be on 
its way soon; thanks for your help.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

             reply	other threads:[~2003-11-19 22:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-19 22:15 Steve deRosier [this message]
2003-11-19 23:18 ` Pops at start of song Mark Knecht
2003-11-20  0:18   ` Steve deRosier
2003-11-20 11:30     ` Jaroslav Kysela
2003-11-20 11:26   ` Jaroslav Kysela
2003-11-20 18:07     ` Mark Knecht
2003-11-20 20:02       ` Martin Langer
2003-11-24 17:43     ` Mark Knecht
2003-11-24 18:29       ` Jaroslav Kysela
2003-11-24 19:01         ` Mark Knecht
2003-11-24 20:51           ` Mark Knecht
2003-11-25  2:30             ` Mark Knecht
2003-11-20  0:33 ` Apostolos Dimitromanolakis
     [not found] ` <3FBC0A54.1020105@cs.utoronto.ca>
2003-11-20  0:45   ` Steve deRosier

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=3FBBEB78.3030706@pianodisc.com \
    --to=derosier@pianodisc.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.