* [PATCH] ASoC: sgtl5000: Improve the error message on slave mode setting
@ 2014-10-02 19:16 Fabio Estevam
2014-10-03 10:20 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2014-10-02 19:16 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel
From: Fabio Estevam <fabio.estevam@freescale.com>
For sgtl5000 to operate in slave mode it can only work in "Synchronous
SYS_MCLK input" mode.
In this mode only the following rates can be supported: 256*Fs, 384*Fs, 512*Fs.
Improve the error message to give a better indication as to why the clocking
failed for slave mode:
[ 12.515399] sgtl5000 1-000a: PLL not supported in slave mode
[ 12.524124] sgtl5000 1-000a: 233 ratio is not supported. SYS_MCLK needs to be 256, 384 or 512 * fs
[ 12.535938] sgtl5000 1-000a: ASoC: can't set sgtl5000 hw params: -22
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
sound/soc/codecs/sgtl5000.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index a604a22..c1936bc 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -626,6 +626,9 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate)
} else {
dev_err(codec->dev,
"PLL not supported in slave mode\n");
+ dev_err(codec->dev, "%d ratio is not supported. "
+ "SYS_MCLK needs to be 256, 384 or 512 * fs\n",
+ sgtl5000->sysclk / sys_fs);
return -EINVAL;
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: sgtl5000: Improve the error message on slave mode setting
2014-10-02 19:16 [PATCH] ASoC: sgtl5000: Improve the error message on slave mode setting Fabio Estevam
@ 2014-10-03 10:20 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-10-03 10:20 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 240 bytes --]
On Thu, Oct 02, 2014 at 04:16:50PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> For sgtl5000 to operate in slave mode it can only work in "Synchronous
> SYS_MCLK input" mode.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-03 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02 19:16 [PATCH] ASoC: sgtl5000: Improve the error message on slave mode setting Fabio Estevam
2014-10-03 10:20 ` Mark Brown
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.