Skip to contentSkip to conversation

ASoC: ad74111: new codec driver

PATCH In review Mike Frysinger 2 participants 8 messages Mar 26, 2011 – Mar 29, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: ad74111: new codec driver

From: Cliff Cai <[email protected]>

---
 sound/soc/codecs/Kconfig   |    8 +++-
 sound/soc/codecs/Makefile  |    4 ++-
 sound/soc/codecs/ad74111.c |   76 ++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/ad74111.h |   63 ++++++++++++++++++++++++++++++++++++
 4 files changed, 148 insertions(+), 3 deletions(-)
 create mode 100644 sound/soc/codecs/ad74111.c
 create mode 100644 sound/soc/codecs/ad74111.h
sound/soc/codecs/Kconfig +6 -2
index dc6d253..ee65b7c 100644
@@ -16,8 +16,9 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_AD183X if SPI_MASTER
 	select SND_SOC_AD193X if SND_SOC_I2C_AND_SPI
 	select SND_SOC_AD1980 if SND_SOC_AC97_BUS
-	select SND_SOC_ADS117X
 	select SND_SOC_AD73311 if I2C
+	select SND_SOC_AD74111
+	select SND_SOC_ADS117X
 	select SND_SOC_AK4104 if SPI_MASTER
 	select SND_SOC_AK4535 if I2C
 	select SND_SOC_AK4642 if I2C
@@ -126,7 +127,10 @@ config SND_SOC_AD1980
 
 config SND_SOC_AD73311
 	tristate
-	
+
+config SND_SOC_AD74111
+	tristate
+
 config SND_SOC_ADS117X
 	tristate
 
sound/soc/codecs/Makefile +3 -1
index 44d3278..b834755 100644
@@ -4,6 +4,7 @@ snd-soc-ad183x-objs := ad183x.o
 snd-soc-ad193x-objs := ad193x.o
 snd-soc-ad1980-objs := ad1980.o
 snd-soc-ad73311-objs := ad73311.o
+snd-soc-ad74111-objs := ad74111.o
 snd-soc-ads117x-objs := ads117x.o
 snd-soc-ak4104-objs := ak4104.o
 snd-soc-ak4535-objs := ak4535.o
@@ -90,7 +91,8 @@ obj-$(CONFIG_SND_SOC_AC97_CODEC)	+= snd-soc-ac97.o
 obj-$(CONFIG_SND_SOC_AD183X)	+= snd-soc-ad183x.o
 obj-$(CONFIG_SND_SOC_AD193X)	+= snd-soc-ad193x.o
 obj-$(CONFIG_SND_SOC_AD1980)	+= snd-soc-ad1980.o
-obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o
+obj-$(CONFIG_SND_SOC_AD73311)	+= snd-soc-ad73311.o
+obj-$(CONFIG_SND_SOC_AD74111)	+= snd-soc-ad74111.o
 obj-$(CONFIG_SND_SOC_ADS117X)	+= snd-soc-ads117x.o
 obj-$(CONFIG_SND_SOC_AK4104)	+= snd-soc-ak4104.o
 obj-$(CONFIG_SND_SOC_AK4535)	+= snd-soc-ak4535.o
sound/soc/codecs/ad74111.c new file +76 -0

76 lines not on this page · raw message

sound/soc/codecs/ad74111.h new file +63 -0

63 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#1 lore raw

sound/soc/codecs/Kconfig config SND_SOC_ALL_CODECS · line 21

Quoted 5 lines · Mike Frysinger
sound/soc/codecs/Kconfig +2 -1
 	select SND_SOC_AD1980 if SND_SOC_AC97_BUS
-	select SND_SOC_ADS117X
 	select SND_SOC_AD73311 if I2C
+	select SND_SOC_AD74111
+	select SND_SOC_ADS117X

A few of your patches have this sort of additional change in them. While the cleanup is good it would be better to split it into a separate patch. Seeing the unrelated change slows down review and it'll also create extra merge issues when applying or cherry picking the driver back to older kernels.

sound/soc/codecs/ad74111.c line 54

Quoted 3 lines
sound/soc/codecs/ad74111.c new file +3 -0
+static struct platform_driver ad74111_codec_driver = {
+	.driver = {
+		.name = "ad74111-codec",

Again, drop the -codec unless this is part of a MFD.

Quoted 3 lines

+/*
+ * definitions for AD74111 registers
+ *

Does this device really have registers? There's no reference at all to them in the driver.

sound/soc/codecs/ad74111.h line 58

Quoted 3 lines
sound/soc/codecs/ad74111.h new file +3 -0
+/* Control register F */
+#define CTRL_REG_F		(5 << 11)
+#define REGF_DAC_VOL(x)		((x) & 0x3F)

If the registers should be here they should be namespaced.

#2 lore raw
Quoted 7 lines · Mark Brown
Quoted 5 lines · Mike Frysinger

      select SND_SOC_AD1980 if SND_SOC_AC97_BUS
-     select SND_SOC_ADS117X
      select SND_SOC_AD73311 if I2C
+     select SND_SOC_AD74111
+     select SND_SOC_ADS117X

Quoted 5 lines

A few of your patches have this sort of additional change in them. While the cleanup is good it would be better to split it into a separate patch.  Seeing the unrelated change slows down review and it'll also create extra merge issues when applying or cherry picking the driver back to older kernels.

in general i agree, but for moving literally one line i dont generally worry about it

Quoted 5 lines
Quoted 3 lines

+static struct platform_driver ad74111_codec_driver = {
+     .driver = {
+             .name = "ad74111-codec",

Again, drop the -codec unless this is part of a MFD.

when i looked at the history of things, it seemed like it's the ASoC maintainers sticking "-codec" on stuff. so should i go through existing drivers and revert that back ?
-mike
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#3 lore raw
Quoted 10 lines · Mike Frysinger
Quoted 5 lines · Mark Brown

A few of your patches have this sort of additional change in them. While the cleanup is good it would be better to split it into a separate patch.  Seeing the unrelated change slows down review and it'll also create extra merge issues when applying or cherry picking the driver back to older kernels.

in general i agree, but for moving literally one line i dont generally worry about it

It's a one line patch that totally changes the shape of the diff for that hunk. As I said above this slows down review, it's jarring as one has to stop and reverse engineer from the change if was intentional and if it is sensible. It could be some unrelated cleanup, it could be (and frequently is) context that got included in the diff by mistake.

Quoted 5 lines
Quoted 1 line

Again, drop the -codec unless this is part of a MFD.

when i looked at the history of things, it seemed like it's the ASoC maintainers sticking "-codec" on stuff. so should i go through existing drivers and revert that back ?

Yes, they were included by mistake as a result of automated changes in the multi-component merges.

#4 lore raw
Quoted 8 lines · Mark Brown
Quoted 7 lines · Mike Frysinger
Quoted 5 lines · Mark Brown

A few of your patches have this sort of additional change in them. While the cleanup is good it would be better to split it into a separate patch.  Seeing the unrelated change slows down review and it'll also create extra merge issues when applying or cherry picking the driver back to older kernels.

Quoted 8 lines
Quoted 2 lines

in general i agree, but for moving literally one line i dont generally worry about it

It's a one line patch that totally changes the shape of the diff for that hunk.  As I said above this slows down review, it's jarring as one has to stop and reverse engineer from the change if was intentional and if it is sensible.  It could be some unrelated cleanup, it could be (and frequently is) context that got included in the diff by mistake.

i still disagree, but considering you have the luxury of not accepting our patches, i guess it doesnt matter too much huh

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Again, drop the -codec unless this is part of a MFD.

when i looked at the history of things, it seemed like it's the ASoC maintainers sticking "-codec" on stuff.  so should i go through existing drivers and revert that back ?

Yes, they were included by mistake as a result of automated changes in the multi-component merges.

ok, should be easy to send out fixes for those
-mike
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#5 lore raw
Quoted 10 lines · Mike Frysinger
Quoted 5 lines · Mark Brown

It's a one line patch that totally changes the shape of the diff for that hunk.  As I said above this slows down review, it's jarring as one has to stop and reverse engineer from the change if was intentional and if it is sensible.  It could be some unrelated cleanup, it could be (and frequently is) context that got included in the diff by mistake.

i still disagree, but considering you have the luxury of not accepting our patches, i guess it doesnt matter too much huh

It's not a luxury, believe me. Most of the issues you guys are having here seem to be process issues as much as anything else, there's a couple of things you could do which would really help make the whole thing run more smoothly:

- Submit against current -next. It looks like you're mostly submitting once a release or so, usually shortly after the release, with code based off either the release that just went out or the release before that. This means that you're going to be at least one kernel revision out of date on current APIs and best practices and sometimes means you're submitting code that won't even compile. ASoC moves pretty quickly so you really do need to check with current code.

- Follow up promptly on reviews - I'm rarely seeing updates to patches that involve any domain specific changes, and where there is followup it's often at the next release. This interacts badly with the submission against old code issues as that means you're likely to require some fairly straightforward API updates but waiting to resubmit means that you'll often end up requiring further updates next time around.

For example, the SSM2604 driver you're submitting now was originally sent last August and you sent patches for ADAV801/3, ADAU1361, ADAU1381 and ADAU1761 at the end of last year which mostly just needed fairly straightforward updates for old kernel issues but which haven't been resubmitted since. None of these devices look like they should be hard to get support integrated into mainline but the above issues are making that harder work than it needs to be.

#6 lore raw
Quoted 8 lines · Mark Brown

 - Follow up promptly on reviews - I'm rarely seeing updates to patches that involve any domain specific changes, and where there is followup it's often at the next release.  This interacts badly with the submission against old code issues as that means you're likely to require some fairly straightforward API updates but waiting to resubmit means that you'll often end up requiring further updates next time around.

Quoted 7 lines

For example, the SSM2604 driver you're submitting now was originally sent last August and you sent patches for ADAV801/3, ADAU1361, ADAU1381 and ADAU1761 at the end of last year which mostly just needed fairly straightforward updates for old kernel issues but which haven't been resubmitted since.  None of these devices look like they should be hard to get support integrated into mainline but the above issues are making that harder work than it needs to be.

atm, it's basically lack of developer time. technically, ADI codecs are no longer my job (they were marginally so in the past). i do any updates that i can slap together in my off time, but as soon as you start talking about real issues (such as exposing registers or programming the part differently), it's beyond my experience. most of the TLA's you throw around i have to look up ;).

so basically yes, i agree it's currently screwed up. -mike
_______________________________________________
Alsa-devel mailing list [email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#7 lore raw
Quoted 6 lines · Mike Frysinger

atm, it's basically lack of developer time. technically, ADI codecs are no longer my job (they were marginally so in the past). i do any updates that i can slap together in my off time, but as soon as you start talking about real issues (such as exposing registers or programming the part differently), it's beyond my experience. most of the TLA's you throw around i have to look up ;).

Sure, I understand the position you're in - I was more meaning ADI as a whole when I said "you" there.