* [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it
@ 2011-09-28 5:47 Axel Lin
2011-09-28 5:48 ` [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk Axel Lin
2011-09-28 7:13 ` [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it Lars-Peter Clausen
0 siblings, 2 replies; 5+ messages in thread
From: Axel Lin @ 2011-09-28 5:47 UTC (permalink / raw)
To: linux-kernel
Cc: Cliff Cai, Lars-Peter Clausen, Liam Girdwood, Mark Brown, alsa-devel
Currently codec->control_data is not initialized before calling
process_sigma_firmware(codec->control_data, ADAU1701_FIRMWARE).
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/adau1701.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 2758d5f..1354902 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -88,6 +88,7 @@
struct adau1701 {
unsigned int dai_fmt;
+ void *control_data;
};
static const struct snd_kcontrol_new adau1701_controls[] = {
@@ -455,9 +456,11 @@ static struct snd_soc_dai_driver adau1701_dai = {
static int adau1701_probe(struct snd_soc_codec *codec)
{
+ struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
int ret;
codec->dapm.idle_bias_off = 1;
+ codec->control_data = adau1701->control_data;
ret = adau1701_load_firmware(codec);
if (ret)
@@ -500,6 +503,7 @@ static __devinit int adau1701_i2c_probe(struct i2c_client *client,
return -ENOMEM;
i2c_set_clientdata(client, adau1701);
+ adau1701->control_data = client;
ret = snd_soc_register_codec(&client->dev, &adau1701_codec_drv,
&adau1701_dai, 1);
if (ret < 0)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk
2011-09-28 5:47 [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it Axel Lin
@ 2011-09-28 5:48 ` Axel Lin
2011-09-28 12:21 ` Mark Brown
2011-09-28 7:13 ` [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it Lars-Peter Clausen
1 sibling, 1 reply; 5+ messages in thread
From: Axel Lin @ 2011-09-28 5:48 UTC (permalink / raw)
To: linux-kernel
Cc: Cliff Cai, Lars-Peter Clausen, Liam Girdwood, Mark Brown, alsa-devel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/adau1701.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 1354902..d2e1237 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -402,7 +402,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute)
}
static int adau1701_set_sysclk(struct snd_soc_codec *codec, int clk_id,
- unsigned int freq, int dir)
+ int source, unsigned int freq, int dir)
{
unsigned int val;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it
2011-09-28 5:47 [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it Axel Lin
2011-09-28 5:48 ` [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk Axel Lin
@ 2011-09-28 7:13 ` Lars-Peter Clausen
1 sibling, 0 replies; 5+ messages in thread
From: Lars-Peter Clausen @ 2011-09-28 7:13 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Cliff Cai, Liam Girdwood, Mark Brown, alsa-devel
On 09/28/2011 07:47 AM, Axel Lin wrote:
> Currently codec->control_data is not initialized before calling
> process_sigma_firmware(codec->control_data, ADAU1701_FIRMWARE).
Just replacing codec->control_data with to_i2c_client(codec->dev) should be a
simpler patch to fix the issue.
Thanks
- Lars
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> sound/soc/codecs/adau1701.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
> index 2758d5f..1354902 100644
> --- a/sound/soc/codecs/adau1701.c
> +++ b/sound/soc/codecs/adau1701.c
> @@ -88,6 +88,7 @@
>
> struct adau1701 {
> unsigned int dai_fmt;
> + void *control_data;
> };
>
> static const struct snd_kcontrol_new adau1701_controls[] = {
> @@ -455,9 +456,11 @@ static struct snd_soc_dai_driver adau1701_dai = {
>
> static int adau1701_probe(struct snd_soc_codec *codec)
> {
> + struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
> int ret;
>
> codec->dapm.idle_bias_off = 1;
> + codec->control_data = adau1701->control_data;
>
> ret = adau1701_load_firmware(codec);
> if (ret)
> @@ -500,6 +503,7 @@ static __devinit int adau1701_i2c_probe(struct i2c_client *client,
> return -ENOMEM;
>
> i2c_set_clientdata(client, adau1701);
> + adau1701->control_data = client;
> ret = snd_soc_register_codec(&client->dev, &adau1701_codec_drv,
> &adau1701_dai, 1);
> if (ret < 0)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk
2011-09-28 5:48 ` [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk Axel Lin
@ 2011-09-28 12:21 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-09-28 12:21 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Cliff Cai, Lars-Peter Clausen, Liam Girdwood, alsa-devel
On Wed, Sep 28, 2011 at 01:48:35PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied this one, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk
@ 2011-09-28 12:21 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-09-28 12:21 UTC (permalink / raw)
To: Axel Lin
Cc: Cliff Cai, Lars-Peter Clausen, linux-kernel, alsa-devel, Liam Girdwood
On Wed, Sep 28, 2011 at 01:48:35PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied this one, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-28 12:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 5:47 [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it Axel Lin
2011-09-28 5:48 ` [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk Axel Lin
2011-09-28 12:21 ` Mark Brown
2011-09-28 12:21 ` Mark Brown
2011-09-28 7:13 ` [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it Lars-Peter Clausen
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.