All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Liam Girdwood <lrg@slimlogic.co.uk>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	ALSA development <alsa-devel@alsa-project.org>
Subject: asoc: fsl_dma_hw_free being called twice at end of playback
Date: Mon, 03 May 2010 15:51:04 -0500	[thread overview]
Message-ID: <4BDF3738.3070900@freescale.com> (raw)

In my 8610 ASoC driver, I'm seeing the DMA driver's .hw_free function being
called twice whenever playback ends.  I've added some printk's to demonstrate:

snd_pcm_common_ioctl1:2543
snd_pcm_hw_free:543
soc_pcm_hw_free:761 c023983c
fsl_dma_hw_free:720 substream=df029d00 dma_private=df440000 stream=0
snd_pcm_release_substream:2022
soc_pcm_hw_free:761 c023983c
fsl_dma_hw_free:720 substream=df029d00 dma_private=df440000 stream=0
fsl_dma_close:759 substream=df029d00 dma_private=df440000

So the ioctl is being called only once, but the both snd_pcm_hw_free() and
snd_pcm_release_substream() are calling the .hw_free function.

Is this normal?  I don't know how to handle this, other than to add some
boolean to my private data structure that indicates whether the resources
have been freed or not.

-- 
Timur Tabi
Linux kernel developer at Freescale

             reply	other threads:[~2010-05-03 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 20:51 Timur Tabi [this message]
2010-05-03 21:02 ` asoc: fsl_dma_hw_free being called twice at end of playback Mark Brown
2010-05-03 21:05   ` Timur Tabi
2010-05-03 23:57 ` Raymond Yau

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=4BDF3738.3070900@freescale.com \
    --to=timur@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    /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.