2010-04-02 05:12:08     SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-04-02 05:12:08     SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Julien Vermillard (FRANCE)

Message: 88024   

 

When I run my fullduplex OSS application on the BF537 stam with the SSM2603 eval board I got those output from alsalib (I think) :

 

snd_pcm_update_hw_ptr_pos: 4 callbacks suppressed

snd_pcm_update_hw_ptr_pos: 3 callbacks suppressed

snd_pcm_update_hw_ptr_pos: 2 callbacks suppressed

snd_pcm_update_hw_ptr_pos: 3 callbacks suppressed

snd_pcm_update_hw_ptr_pos: 3 callbacks suppressed

 

 

And some clicks on the audio output.

 

Any idea ?

QuoteReplyEditDelete

 

 

2010-04-05 22:38:19     Re: SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Cliff Cai (CHINA)

Message: 88110   

 

Julien,

 

Could you tell me which blackfin linux distribution are you using?

 

I just tried it on svn head with "vrec -w|vplay" and didn't see the message.

 

 

 

Cliff

QuoteReplyEditDelete

 

 

2010-04-07 04:21:27     Re: SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Julien Vermillard (FRANCE)

Message: 88181   

 

I'm using the last SVN kernel :

 

Linux blackfin 2.6.33.2-ADI-2010R1-pre

 

For the distrib, I'm using 2009R1.1-rc1

QuoteReplyEditDelete

 

 

2010-04-08 04:39:47     Re: SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Cliff Cai (CHINA)

Message: 88227   

 

Julien,

 

Could you add some printks in sound/core/pcm_lib.c/snd_pcm_update_hw_ptr_pos(),

 

if you can hear clicks,I'm afraid that xrun occur.

 

 

 

Cliff

QuoteReplyEditDelete

 

 

2010-04-08 06:39:30     Re: SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Julien Vermillard (FRANCE)

Message: 88229   

 

I removed the call to ratelimit in snd_pcm_update_hw_ptr_pos and the noise is gone.

 

Look like it's the ratelimit code who slow things down and create the clicks.

 

Here my kludge :

 

static snd_pcm_uframes_t

snd_pcm_update_hw_ptr_pos(struct snd_pcm_substream *substream,

                          struct snd_pcm_runtime *runtime)

{

        snd_pcm_uframes_t pos;

 

        pos = substream->ops->pointer(substream);

        if (pos == SNDRV_PCM_POS_XRUN)

                return pos; /* XRUN */

        if (pos >= runtime->buffer_size) {

                //if (printk_ratelimit()) {

                        char name[16];

                        pcm_debug_name(substream, name, sizeof(name));

                        snd_printd(KERN_ERR  "BUG: %s, pos = 0x%lx, "

                                   "buffer size = 0x%lx, period size = 0x%lx\n",

                                   name, pos, runtime->buffer_size,

                                   runtime->period_size);

                //}

                pos = 0;

        }

        pos -= pos % runtime->min_align;

        return pos;

}

QuoteReplyEditDelete

 

 

2010-04-09 02:47:41     Re: SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Cliff Cai (CHINA)

Message: 88242   

 

mm,pos equal to runtime->buffer_size is a normal case,it's so weird that "printk_ratelimit" can cause click.

 

 

 

Cliff

QuoteReplyEditDelete

 

 

2010-11-23 05:45:51     Re: SSM2603 : snd_pcm_update_hw_ptr_pos: callbacks suppressed

Rob Maris (GERMANY)

Message: 96130   

 

I'm also encountering this printk output, since using Linux 2.6.34 with Linphone. With elder linux kernel (here 2.6.28) there were no problems. Through history lib/ratelimit.c has only minor changes (I cannot judge if they are responsible for doing printk output now).

 

snd_pcm_update_hw_ptr0: 1 callbacks suppressed, appears approx. every 6-10 seconds.

 

I'm also going to (temporarily!) outcomment the call, because it is my goal to have any output removed from the standard output, which is assigned to the serial port (interrupt load issue).

 

I'd appreciate hints about the 'why' of this output going on with newer kernel.

Attachments

    Outcomes