* [PATCH] ASoC: rt5640: Provide more useful hw_params error reasons.
@ 2013-09-13 16:57 Liam Girdwood
2013-09-13 16:57 ` [PATCH] ASoC: rt5640: Add ACPI probing support Liam Girdwood
0 siblings, 1 reply; 3+ messages in thread
From: Liam Girdwood @ 2013-09-13 16:57 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
sound/soc/codecs/rt5640.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 2f6bb16..de40bd9 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -1609,7 +1609,8 @@ static int rt5640_hw_params(struct snd_pcm_substream *substream,
rt5640->lrck[dai->id] = params_rate(params);
pre_div = get_clk_info(rt5640->sysclk, rt5640->lrck[dai->id]);
if (pre_div < 0) {
- dev_err(codec->dev, "Unsupported clock setting\n");
+ dev_err(codec->dev, "Unsupported clock setting %d for DAI %d\n",
+ rt5640->lrck[dai->id], dai->id);
return -EINVAL;
}
frame_size = snd_soc_params_to_frame_size(params);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ASoC: rt5640: Add ACPI probing support.
2013-09-13 16:57 [PATCH] ASoC: rt5640: Provide more useful hw_params error reasons Liam Girdwood
@ 2013-09-13 16:57 ` Liam Girdwood
2013-09-13 17:30 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Liam Girdwood @ 2013-09-13 16:57 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown
Allow the RT5640 to be probed as an ACPI I2C device.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
sound/soc/codecs/rt5640.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index de40bd9..0bfb960 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -21,6 +21,7 @@
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
+#include <linux/acpi.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
@@ -2081,6 +2082,12 @@ static const struct i2c_device_id rt5640_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
+static struct acpi_device_id rt5640_acpi_match[] = {
+ { "INT33CA", 0 },
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
+
static int rt5640_parse_dt(struct rt5640_priv *rt5640, struct device_node *np)
{
rt5640->pdata.in1_diff = of_property_read_bool(np,
@@ -2200,6 +2207,7 @@ static struct i2c_driver rt5640_i2c_driver = {
.driver = {
.name = "rt5640",
.owner = THIS_MODULE,
+ .acpi_match_table = ACPI_PTR(rt5640_acpi_match),
},
.probe = rt5640_i2c_probe,
.remove = rt5640_i2c_remove,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rt5640: Add ACPI probing support.
2013-09-13 16:57 ` [PATCH] ASoC: rt5640: Add ACPI probing support Liam Girdwood
@ 2013-09-13 17:30 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-09-13 17:30 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 228 bytes --]
On Fri, Sep 13, 2013 at 05:57:36PM +0100, Liam Girdwood wrote:
> Allow the RT5640 to be probed as an ACPI I2C device.
Applied both, thanks.
> +static struct acpi_device_id rt5640_acpi_match[] = {
> + { "INT33CA", 0 },
Wow :)
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-13 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-13 16:57 [PATCH] ASoC: rt5640: Provide more useful hw_params error reasons Liam Girdwood
2013-09-13 16:57 ` [PATCH] ASoC: rt5640: Add ACPI probing support Liam Girdwood
2013-09-13 17:30 ` 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.