All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Nick Hogle <fozzy915@hotmail.com>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Bug in pcm_plugin.c, function snd_pcm_plug_alloc?
Date: Tue, 16 Sep 2003 13:48:21 +0100	[thread overview]
Message-ID: <3F670695.3090500@superbug.demon.co.uk> (raw)
In-Reply-To: <Sea2-F56hIIqgRXrJro00002e39@hotmail.com>

Nick Hogle wrote:
> I believe this is a bug: the loop in plug_alloc doesn't iterate 
> completely through the plugin linked list.   The problem with this, is 
> that snd_pcm_plugin_alloc won't get called for every plugin in the list, 
> and vital components of those plugins won't be initialized.
> 
> The solution would be to replace the while (plugin->next/prev) lines 
> with while (plugin), to move lines: plugin = plugin->next/prev to the 
> spot just after if (err < 0) return err;
> 
> I found that the aformentioned changes fixed a problem I was having with 
> reading from /dev/dsp.   Unless I set the rate to 48000, then read() 
> would always return 0.  This was because when read_transfer iterated 
> through the plugins, the "rate conversion" plugin, which had not been 
> initialized, had the value 0 in dst_channels[0].frames.  This caused the 
> entire read call to return 0.
> 
> BTW, I'm using the intel8x0 driver, and the latest 0.9.6 release of 
> alsa-drivers.
> 
> Anyone else agree that this is a bug?  Or am I missing something, that 
> requires that plug_alloc to NOT iterate completely through the list?
> 
> Thanks,
> -Nick
> 
I see the "read return 0" problem sometimes with the intel8x0, but for 
me the problem appeared with arecord, and seemed to depend on some mixer 
settings.
Cheers
James




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

  reply	other threads:[~2003-09-16 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-16  9:26 Bug in pcm_plugin.c, function snd_pcm_plug_alloc? Nick Hogle
2003-09-16 12:48 ` James Courtier-Dutton [this message]
2003-09-16 16:31 ` Takashi Iwai

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=3F670695.3090500@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=fozzy915@hotmail.com \
    /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.