All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] ASoC: core: init delayed_work for codec-codec links
Date: Fri, 2 Aug 2013 11:01:08 +0100	[thread overview]
Message-ID: <20130802100108.GA17936@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20130731131627.GA32631@opensource.wolfsonmicro.com>

We must init the delayed_work for codec-codec links
otherwise shutting down the DAI chain will fault when
calling flush_delayed_work_sync() on the linked DAI.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
 sound/soc/soc-core.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4489c5b..e649efe 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -199,6 +199,14 @@ static ssize_t pmdown_time_set(struct device *dev,
 	return count;
 }
 
+static void codec2codec_close_delayed_work(struct work_struct *work)
+{
+	/* No action required.
+	 * C2C links only represent a hardware connection and currently
+	 * we assume that we don't have to explicitly start or stop them
+	 */
+}
+
 static DEVICE_ATTR(pmdown_time, 0644, pmdown_time_show, pmdown_time_set);
 
 #ifdef CONFIG_DEBUG_FS
@@ -1428,6 +1436,9 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
 				return ret;
 			}
 		} else {
+			INIT_DELAYED_WORK(&rtd->delayed_work,
+						codec2codec_close_delayed_work);
+
 			/* link the DAI widgets */
 			play_w = codec_dai->playback_widget;
 			capture_w = cpu_dai->capture_widget;
-- 
1.7.2.5

  parent reply	other threads:[~2013-08-02 10:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31 13:16 [PATCH] ASoC: core: init delayed_work for codec-codec links Richard Fitzgerald
2013-07-31 13:16 ` Richard Fitzgerald
2013-07-31 13:25 ` Mark Brown
2013-07-31 13:25   ` Mark Brown
2013-08-01 15:13   ` Richard Fitzgerald
2013-08-01 15:23     ` Mark Brown
2013-08-01 15:23       ` Mark Brown
2013-08-01 15:50       ` Richard Fitzgerald
2013-08-01 18:47         ` Mark Brown
2013-08-02 10:01 ` Richard Fitzgerald [this message]
2013-08-02 10:14   ` [PATCH v2] " Mark Brown
2013-08-02 10:14     ` Mark Brown
2013-08-02 10:51 ` [PATCH v3] " Richard Fitzgerald
2013-08-02 10:51   ` [alsa-devel] " Richard Fitzgerald
2013-08-05 10:33   ` Mark Brown
2013-08-05 12:17 ` [PATCH v4] " Richard Fitzgerald
2013-08-05 12:17   ` [alsa-devel] " Richard Fitzgerald
2013-08-05 16:09   ` Mark Brown
2013-08-05 16:09     ` [alsa-devel] " Mark Brown

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=20130802100108.GA17936@opensource.wolfsonmicro.com \
    --to=rf@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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.