From: Ben Dooks <ben-alsa@fluff.org>
To: alsa-devel@alsa-project.org
Cc: broonie@opensource.wolfsonmicro.com
Subject: [patch 7/9] ASoC: Ensure codec check hw_write error at probe
Date: Wed, 04 Mar 2009 00:49:32 +0000 [thread overview]
Message-ID: <20090304005139.164366737@fluff.org.uk> (raw)
In-Reply-To: 20090304004925.530566010@fluff.org.uk
[-- Attachment #1: audio/fix-i2c-error-returns.patch --]
[-- Type: text/plain, Size: 1627 bytes --]
Add checks to see if wmXXXX_reset() failed and notify
the user of the problem. This is generally due to a
problem on the i2c bus such as an un-powered or
non-connected codec.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Index: linux-2.6.29-rc6-quilt1/sound/soc/codecs/wm8731.c
===================================================================
--- linux-2.6.29-rc6-quilt1.orig/sound/soc/codecs/wm8731.c 2009-02-25 11:14:15.000000000 +0000
+++ linux-2.6.29-rc6-quilt1/sound/soc/codecs/wm8731.c 2009-02-25 11:14:37.000000000 +0000
@@ -521,7 +521,11 @@ static int wm8731_init(struct snd_soc_de
if (codec->reg_cache == NULL)
return -ENOMEM;
- wm8731_reset(codec);
+ ret = wm8731_reset(codec);
+ if (ret < 0) {
+ printk(KERN_ERR "wm8731: failed to send reset\n");
+ return -EIO;
+ }
/* register pcms */
ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
Index: linux-2.6.29-rc6-quilt1/sound/soc/codecs/wm8753.c
===================================================================
--- linux-2.6.29-rc6-quilt1.orig/sound/soc/codecs/wm8753.c 2009-02-25 11:14:15.000000000 +0000
+++ linux-2.6.29-rc6-quilt1/sound/soc/codecs/wm8753.c 2009-02-25 11:14:37.000000000 +0000
@@ -1573,7 +1573,11 @@ static int wm8753_init(struct snd_soc_de
wm8753_set_dai_mode(codec, 0);
- wm8753_reset(codec);
+ ret = wm8753_reset(codec);
+ if (ret < 0) {
+ printk(KERN_ERR "wm8753: failed reset, not present?\n");
+ return -EIO;
+ }
/* register pcms */
ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
next prev parent reply other threads:[~2009-03-04 0:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 0:49 [patch 0/9] S3C24XX/S3C64XX updates Ben Dooks
2009-03-04 0:49 ` [patch 1/9] S3C24XX: Move and update IIS headers Ben Dooks
2009-03-04 0:49 ` [patch 2/9] JIVE: Add ASoC audio support Ben Dooks
2009-03-04 14:57 ` Mark Brown
2009-03-04 0:49 ` [patch 3/9] S3C: Move <mach/audio.h> to <plat/audio.h> Ben Dooks
2009-03-04 0:49 ` [patch 4/9] S3C24XX ASoC: Fix copyright statements on Simtec files Ben Dooks
2009-03-04 19:20 ` Mark Brown
2009-03-04 0:49 ` [patch 5/9] S3C: Split s3c2412-i2s.c into core and SoC specific parts Ben Dooks
2009-03-04 19:52 ` Mark Brown
2009-03-04 0:49 ` [patch 6/9] S3C64XX: Add s3c64xx-i2s support Ben Dooks
2009-03-04 0:56 ` Ben Dooks
2009-03-04 19:56 ` Mark Brown
2009-03-04 0:49 ` Ben Dooks [this message]
2009-03-04 19:57 ` [patch 7/9] ASoC: Ensure codec check hw_write error at probe Mark Brown
2009-03-04 0:49 ` [patch 8/9] SMDK6410: Add support for WM8731 on an add-on board Ben Dooks
2009-03-04 20:06 ` Mark Brown
2009-03-04 0:49 ` [patch 9/9] AUDIO: Select DMA if I2S is configured Ben Dooks
2009-03-04 20:29 ` [patch 0/9] S3C24XX/S3C64XX updates Mark Brown
2009-03-05 7:23 ` Takashi Iwai
2009-03-05 10:31 ` Mark Brown
2009-03-05 10:36 ` Takashi Iwai
2009-03-05 11:03 ` Mark Brown
2009-03-11 10:39 ` Ben Dooks
2009-03-11 12:47 ` 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=20090304005139.164366737@fluff.org.uk \
--to=ben-alsa@fluff.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox