All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] *** SUBJECT HERE ***
@ 2010-07-22  9:38 Matti J. Aaltonen
  2010-07-22  9:38 ` [PATCH v2 1/1] ASoC: TI WL1273 FM Radio Codec Matti J. Aaltonen
  2010-07-22  9:48 ` [PATCH v2 0/1] *** SUBJECT HERE *** Mark Brown
  0 siblings, 2 replies; 15+ messages in thread
From: Matti J. Aaltonen @ 2010-07-22  9:38 UTC (permalink / raw)
  To: alsa-devel, broonie, lrg; +Cc: Matti J. Aaltonen


Hello.

And thank you for all the comments. 

Comments to comments:

>> +#undef DEBUG
>
> This shouldn't be here.

Removed.

>> +     wl1273->mode = ucontrol->value.integer.value[0];
>
> You're not doing any validation of the supplied value here.

Validation added.

> Don't put your enums in arrays, it just makes things harder to maintain
> since you have to reference an index into an array rather than a named
> value.

Yes using one-element arrays is kind of meaningless, so arrays removed.

> My major comment about this driver is that it'd probably make sense to
> redo it on top of Liam's multi-component branch, though it shouldn't be
> a pressing concern for merge.

I didn't do this yet. But could you give me the git URL and then I'll resend?

> Wouldn't it be nicer to do this stuff with the ALSA constraint APIs
> rather than futzing with the constant data?

I principle I of course agree. But it seems - also discussed with the local
ALSA specialist - that using static constraints does not work here.
HALF_DUPLEX is not one of the SNDRV_PCM_HW_PARAM_'s... or something like that.
As a ALSA non-specialist I'd be willing to this leave as it is...

>> +static int wl1273_set_dai_fmt(struct snd_soc_dai *codec_dai,
>> +                           unsigned int fmt)
>> +{
>> +     return 0;
>> +}
>
>Remove unused functions.

I tried leaving this out but then the codec stopped working. I guess I should
mention that my test environment is 2.6.32. I'm only able to test that
the codec compiles under 2.6.35. Anyway I left the function in.

>> +enum wl1273_mode wl1273_get_codec_mode(struct snd_soc_codec *codec)
>> +{
>> +     struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
>> +     return wl1273->mode;
>> +}
>> +EXPORT_SYMBOL_GPL(wl1273_get_codec_mode);
>
> Why is this being exported?

This is because the soc_card driver needs to know the codec mode and accessing
the internals of the codec struct is ugly.

>> +static int wl1273_soc_suspend(struct platform_device *pdev, pm_message_t state)
>> +{
>> +     return 0;
>> +}
>> +
>> +static int wl1273_soc_resume(struct platform_device *pdev)
>> +{
>> +     return 0;
>> +}
>
> Remove unused functions.

Dropping these caused no problems, so removed...

Cheers,
Matti A.

Matti J. Aaltonen (1):
  ASoC: TI WL1273 FM Radio Codec.

 sound/soc/codecs/wl1273.c |  586 +++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/wl1273.h |   42 ++++
 2 files changed, 628 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/codecs/wl1273.c
 create mode 100644 sound/soc/codecs/wl1273.h

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-07-22 14:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22  9:38 [PATCH v2 0/1] *** SUBJECT HERE *** Matti J. Aaltonen
2010-07-22  9:38 ` [PATCH v2 1/1] ASoC: TI WL1273 FM Radio Codec Matti J. Aaltonen
2010-07-22  9:48 ` [PATCH v2 0/1] *** SUBJECT HERE *** Mark Brown
2010-07-22 10:57   ` Peter Ujfalusi
2010-07-22 11:02     ` Mark Brown
2010-07-22 11:07     ` Peter Ujfalusi
2010-07-22 11:30       ` Takashi Iwai
2010-07-22 12:04         ` Mark Brown
2010-07-22 11:18   ` matti.j.aaltonen
2010-07-22 11:25     ` Peter Ujfalusi
2010-07-22 11:37       ` matti.j.aaltonen
2010-07-22 12:02     ` Mark Brown
2010-07-22 12:11       ` matti.j.aaltonen
2010-07-22 13:05         ` Mark Brown
2010-07-22 14:13           ` Matti J. Aaltonen

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.