From: Felipe Balbi <me@felipebalbi.com>
To: Felipe Balbi <me@felipebalbi.com>
Cc: Steve Sakoman <sakoman@gmail.com>,
Jarkko Nikula <jarkko.nikula@nokia.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [RFC 0/2] McBSP and ASoC OMAP update patches for 2430 and 34xx
Date: Tue, 26 Aug 2008 00:39:26 +0300 [thread overview]
Message-ID: <20080825213922.GD14939@frodo> (raw)
In-Reply-To: <20080825213510.GC14939@frodo>
On Tue, Aug 26, 2008 at 12:35:13AM +0300, Felipe Balbi wrote:
> On Mon, Aug 25, 2008 at 12:19:16PM -0700, Steve Sakoman wrote:
> > ALSA sound/core/pcm_native.c:2573: BUG? (substream != ((void *)0))
>
> Hmmm... this looks odd.
>
> Jarkko, shouldn't that snd_assert() in pcm_native.c check if substream
> _is_ NULL instead of !is NULL ?
>
> I mean:
>
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index c49b9d9..db86090 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -2570,7 +2570,7 @@ static int snd_pcm_playback_ioctl1(struct file *file,
> struct snd_pcm_substream *substream,
> unsigned int cmd, void __user *arg)
> {
> - snd_assert(substream != NULL, return -ENXIO);
> + snd_assert(substream == NULL, return -ENXIO);
> snd_assert(substream->stream == SNDRV_PCM_STREAM_PLAYBACK, return -EINVAL);
> switch (cmd) {
> case SNDRV_PCM_IOCTL_WRITEI_FRAMES:
>
> If you follow up the function calls, we can see that substream is
> initialized in pcm_native.c:snd_pcm_open_file():
>
> 2080 err = snd_pcm_open_substream(pcm, stream, file, &substream);
> 2081 if (err < 0)
> 2082 return err;
>
> and that initialized pointer is added to pcm_file in the same function
> a few lines later:
>
> 2089 pcm_file->substream = substream;
>
> Am I misreading something ? :-s
btw, the for loop in pcm.c:snd_pcm_attach_substream looks weird.
Couldn't it be changed to use list_for_each_entry() or any of its friends ?
797 for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substr eam->next) {
--
balbi
next prev parent reply other threads:[~2008-08-25 21:39 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 11:55 [RFC 0/2] McBSP and ASoC OMAP update patches for 2430 and 34xx Jarkko Nikula
2008-08-21 11:55 ` [RFC] ARM: OMAP: Add support for OMAP2430 in McBSP Jarkko Nikula
2008-08-21 11:55 ` [RFC] ASoC: OMAP: Add support for OMAP2430 and OMAP34xx in McBSP DAI driver Jarkko Nikula
2008-08-21 21:51 ` [RFC 0/2] McBSP and ASoC OMAP update patches for 2430 and 34xx Steve Sakoman
2008-08-22 7:57 ` Jarkko Nikula
2008-08-25 19:19 ` Steve Sakoman
2008-08-25 19:29 ` Felipe Balbi
2008-08-25 21:35 ` Felipe Balbi
2008-08-25 21:39 ` Felipe Balbi [this message]
2008-08-25 21:50 ` Steve Sakoman
2008-08-25 21:53 ` Felipe Balbi
2008-08-25 22:13 ` Steve Sakoman
2008-08-25 22:30 ` Steve Sakoman
2008-08-25 22:40 ` Felipe Balbi
2008-08-25 22:54 ` Felipe Balbi
2008-08-25 23:34 ` Steve Sakoman
2008-08-26 0:08 ` Felipe Balbi
2008-08-26 13:19 ` Jarkko Nikula
2008-08-26 14:23 ` Steve Sakoman
2008-08-26 17:18 ` Steve Sakoman
2008-08-27 6:38 ` Jarkko Nikula
2008-08-27 13:39 ` Steve Sakoman
2008-08-27 20:57 ` Steve Sakoman
2008-08-27 21:25 ` Koen Kooi
2008-08-27 22:14 ` Steve Sakoman
2008-08-28 11:03 ` Jarkko Nikula
2008-08-23 11:32 ` Arun KS
2008-09-05 1:12 ` Tony Lindgren
2008-09-05 6:18 ` Steve Sakoman
2008-09-05 16:56 ` Tony Lindgren
2008-09-05 17:23 ` Steve Sakoman
2008-09-05 17:52 ` Tony Lindgren
2008-09-08 10:29 ` [RFC 0/2 rev2] " Jarkko Nikula
2008-09-09 0:48 ` Tony Lindgren
2008-09-08 10:29 ` [RFC rev2] ARM: OMAP: Add support for OMAP2430 in McBSP Jarkko Nikula
2008-09-08 10:29 ` [RFC rev2] ASoC: OMAP: Add support for OMAP2430 and OMAP34xx in McBSP DAI driver Jarkko Nikula
2008-09-20 11:22 ` [RFC 0/2] McBSP and ASoC OMAP update patches for 2430 and 34xx Arun KS
2008-09-20 11:41 ` Koen Kooi
2008-09-20 12:03 ` Arun KS
[not found] ` <dfeb90390809200453i35da7891lcea6d620dbb0e46a@mail.gmail.com>
2008-09-20 12:21 ` Koen Kooi
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=20080825213922.GD14939@frodo \
--to=me@felipebalbi.com \
--cc=jarkko.nikula@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=sakoman@gmail.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.