Skip to contentSkip to conversation

ASoC: Add ADAU1701 codec driver

PATCH Superseded Lars-Peter Clausen 4 participants 23 messages Jun 10, 2011

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Lars-Peter Clausen

author maintainer
#0 lore raw

PATCH 1/3 ASoC: Add ADAU1701 codec driver

This patch adds support for the Analog Devices ADAU1701 SigmaDSP.

---
 sound/soc/codecs/Kconfig    |    7 +-
 sound/soc/codecs/Makefile   |    2 +
 sound/soc/codecs/adau1701.c |  547 +++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/adau1701.h |   17 ++
 4 files changed, 572 insertions(+), 1 deletions(-)
 create mode 100644 sound/soc/codecs/adau1701.c
 create mode 100644 sound/soc/codecs/adau1701.h
sound/soc/codecs/Kconfig +6 -1
index 98175a0..f745e55 100644
@@ -17,6 +17,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_AD193X if SND_SOC_I2C_AND_SPI
 	select SND_SOC_AD1980 if SND_SOC_AC97_BUS
 	select SND_SOC_AD73311
+	select SND_SOC_ADAU1701 if I2C
 	select SND_SOC_ADS117X
 	select SND_SOC_AK4104 if SPI_MASTER
 	select SND_SOC_AK4535 if I2C
@@ -130,7 +131,11 @@ config SND_SOC_AD1980
 
 config SND_SOC_AD73311
 	tristate
-	
+
+config SND_SOC_ADAU1701
+	select SIGMA
+	tristate
+
 config SND_SOC_ADS117X
 	tristate
 
sound/soc/codecs/Makefile +2 -0
index fd85584..30a4c63 100644
@@ -4,6 +4,7 @@ snd-soc-ad1836-objs := ad1836.o
 snd-soc-ad193x-objs := ad193x.o
 snd-soc-ad1980-objs := ad1980.o
 snd-soc-ad73311-objs := ad73311.o
+snd-soc-adau1701-objs := adau1701.o
 snd-soc-ads117x-objs := ads117x.o
 snd-soc-ak4104-objs := ak4104.o
 snd-soc-ak4535-objs := ak4535.o
@@ -95,6 +96,7 @@ obj-$(CONFIG_SND_SOC_AD1836)	+= snd-soc-ad1836.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_ADAU1701)  += snd-soc-adau1701.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/adau1701.c new file +547 -0

547 lines not on this page · raw message

sound/soc/codecs/adau1701.h new file +17 -0
new file mode 100644
index 0000000..8d0949a
@@ -0,0 +1,17 @@
+/*
+ * header file for ADAU1701 SigmaDSP processor
+ *
+ * Copyright 2011 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef _ADAU1701_H
+#define _ADAU1701_H
+
+enum adau1701_clk_src {
+	ADAU1701_CLK_SRC_OSC,
+	ADAU1701_CLK_SRC_MCLK,
+};
+
+#endif
Signature · 1 line
1.7.2.5
author maintainer
#1 lore raw

PATCH 2/3 ASoC: Blackfin: Add bf5xx-adau1701 machine driver

Add a machine driver to support the ADAU1701 SigmaDSP processors on Analog Devices BF5XX evaluation boards.

---
 sound/soc/blackfin/Kconfig          |   10 +++
 sound/soc/blackfin/Makefile         |    2 +
 sound/soc/blackfin/bf5xx-adau1701.c |  118 +++++++++++++++++++++++++++++++++++
 3 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/blackfin/bf5xx-adau1701.c
sound/soc/blackfin/Kconfig +10 -0
index ae40359..0777210 100644
@@ -17,6 +17,16 @@ config SND_BF5XX_SOC_SSM2602
 	help
 	  Say Y if you want to add support for SoC audio on BF527-EZKIT.
 
+config SND_BF5XX_SOC_ADAU1701
+	tristate "SoC ADAU1701 Audio support for BF5xx eval boards"
+	depends on SND_BF5XX_I2S
+	select SND_BF5XX_SOC_I2S
+	select SND_SOC_ADAU1701
+	select I2C
+	help
+	  Say Y if you want to add support for the ADAU1701 SigmaDSP processor on
+	  Analog Devices BF5xx evaluation boards.
+
 config SND_BF5XX_SOC_AD73311
 	tristate "SoC AD73311 Audio support for Blackfin"
 	depends on SND_BF5XX_I2S
sound/soc/blackfin/Makefile +2 -0
index 49af3f3..1d75173 100644
@@ -21,9 +21,11 @@ snd-ad1980-objs := bf5xx-ad1980.o
 snd-ssm2602-objs := bf5xx-ssm2602.o
 snd-ad73311-objs := bf5xx-ad73311.o
 snd-ad193x-objs := bf5xx-ad193x.o
+snd-adau1701-objs := bf5xx-adau1701.o
 
 obj-$(CONFIG_SND_BF5XX_SOC_AD1836) += snd-ad1836.o
 obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o
 obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o
 obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o
 obj-$(CONFIG_SND_BF5XX_SOC_AD193X) += snd-ad193x.o
+obj-$(CONFIG_SND_BF5XX_SOC_ADAU1701) += snd-adau1701.o
sound/soc/blackfin/bf5xx-adau1701.c new file +118 -0

118 lines not on this page · raw message

Signature · 1 line
1.7.2.5
author maintainer
#11 lore raw

PATCH 3/3 Blackfin: bf537: Stamp: Register adau1701 codec and ASoC machine driver

In reply to Lars-Peter Clausen
---
 arch/blackfin/mach-bf537/boards/stamp.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
arch/blackfin/mach-bf537/boards/stamp.c +17 -0
index 76db1d4..1365cbd 100644
@@ -2390,6 +2390,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
 		I2C_BOARD_INFO("adau1361", 0x38),
 	},
 #endif
+#if defined(CONFIG_SND_SOC_ADAU1701) || defined(CONFIG_SND_SOC_ADAU1701_MODULE)
+	{
+		I2C_BOARD_INFO("adau1701", 0x34),
+	},
+#endif
 #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE)
 	{
 		I2C_BOARD_INFO("ad5258", 0x18),
@@ -2760,6 +2765,13 @@ static struct platform_device iio_gpio_trigger = {
 };
 #endif
 
+#if defined(CONFIG_SND_BF5XX_SOC_ADAU1701) || \
+	defined(CONFIG_SND_BF5XX_SOC_ADAU1701_MODULE)
+static struct platform_device bf5xx_adau1701_device = {
+	.name = "bf5xx-adau1701",
+};
+#endif
+
 static struct platform_device *stamp_devices[] __initdata = {
 
 	&bfin_dpmc,
@@ -2914,6 +2926,11 @@ static struct platform_device *stamp_devices[] __initdata = {
 	defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
 	&iio_gpio_trigger,
 #endif
+
+#if defined(CONFIG_SND_BF5XX_SOC_ADAU1701) || \
+	defined(CONFIG_SND_BF5XX_SOC_ADAU1701_MODULE)
+	&bf5xx_adau1701_device,
+#endif
 };
 
 static int __init stamp_init(void)
Signature · 1 line
1.7.2.5
#13 lore raw
In reply to Lars-Peter Clausen
Quoted 3 lines · Lars-Peter Clausen

This patch adds support for the Analog Devices ADAU1701 SigmaDSP.

Looks OK but one thing it'd be nice to do:

Quoted 5 lines
sound/soc/codecs/adau1701.c new file +5 -0
+static unsigned int adau1701_register_size(unsigned int reg)
+{
+	switch (reg) {
+	case ADAU1701_DSPCTRL:
+	case ADAU1701_SEROCTL:

sound/soc/codecs/adau1701.c line 136

Quoted 10 lines
sound/soc/codecs/adau1701.c new file +10 -0
+	case ADAU1701_AUXNPOW:
+	case ADAU1701_OSCIPOW:
+	case ADAU1701_DACSET:
+		return 2;
+	case ADAU1701_SERICTL:
+		return 1;
+	}
+
+	return 0;
+}

I'd be happier if this complained loudly when it fell through the switch in case something goes wrong. You've got checks in the callers but I'd feel safer if the log were here in case we missed a caller.

Also someone should remonstrate with the hardware designers.

#2 lore raw

Re: [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Lars-Peter Clausen
Quoted 2 lines · Lars-Peter Clausen

Add a machine driver to support the ADAU1701 SigmaDSP processors on Analog Devices BF5XX evaluation boards.

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific. It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

But it's about the same as all the other drivers so...

Quoted 9 lines
sound/soc/blackfin/bf5xx-adau1701.c new file +9 -0
+static struct snd_soc_dai_link bf5xx_adau1701_dai[] = {
+	{
+		.name = "adau1701",
+		.stream_name = "adau1701",
+		.cpu_dai_name = "bfin-i2s.0",
+		.codec_dai_name = "adau1701",
+		.platform_name = "bfin-i2s-pcm-audio",
+		.codec_name = "adau1701.0-0034",
+		.ops = &bf5xx_adau1701_ops,

sound/soc/blackfin/bf5xx-adau1701.c line 66

Quoted 10 lines
sound/soc/blackfin/bf5xx-adau1701.c new file +10 -0
+	},
+	{
+		.name = "adau1701",
+		.stream_name = "adau1701",
+		.cpu_dai_name = "bfin-i2s.1",
+		.codec_dai_name = "adau1701",
+		.platform_name = "bfin-i2s-pcm-audio",
+		.codec_name = "adau1701.0-0034",
+		.ops = &bf5xx_adau1701_ops,
+	},

For example this mapping could vary between systems, and I guess there may be some possiblity that the CODEC I2C address could change.

#17 lore raw
In reply to Lars-Peter Clausen
Quoted 1 line · Lars-Peter Clausen

+MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");

did you actually rewrite this thing from scratch ? seems like you should keep Cliff as the author in git/MODULE_AUTHOR, and then add your name to the s-o-b list and this macro.

friendly git commits can easily be cherry picked from my tree for asoc stuff:
http://git.kernel.org/?p=linux/kernel/git/vapier/blackfin.git;a=summary
(see the "trunk" branch)
-mike

#14 lore raw
In reply to Mark Brown
Quoted 1 line · Mark Brown

Also someone should remonstrate with the hardware designers.

if there's things we can take back, i can forward them along. the last conversation i had with them sounded like they have no problem accepting feedback.
-mike

#3 lore raw

Re: [Device-drivers-devel] [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Mark Brown
Quoted 8 lines · Mark Brown
Quoted 2 lines · Lars-Peter Clausen

Add a machine driver to support the ADAU1701 SigmaDSP processors on Analog Devices BF5XX evaluation boards.

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific.  It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

i know you keep complaining, but i honestly dont understand why this is undesirable. connecting a codec to a Blackfin is pretty much always the same. you pick a SPORT # and that's about it.

the spi cs and i2c address could differ (so maybe make that a field for the platform resources), but otherwise i dont see why people should have to copy & paste the same code to change all of 4 bytes. -mike
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#12 lore raw

Re: [Device-drivers-devel] [PATCH 3/3] Blackfin: bf537: Stamp: Register adau1701 codec and ASoC machine driver

In reply to Lars-Peter Clausen

looks straightforward. once the codec/machine driver get merged, i'll run this through my Blackfin tree of course.
-mike

author maintainer
#7 lore raw

Re: [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Mark Brown
Quoted 8 lines · Mark Brown
Quoted 2 lines · Lars-Peter Clausen

Add a machine driver to support the ADAU1701 SigmaDSP processors on Analog Devices BF5XX evaluation boards.

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific. It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

I think this is due, that the codecs them-self sit on an add-on board to the bf5xx eval boards.
So you have two boards, the bf5xx eval board with has the codec eval board connected to it. That's why it it is kept so generic. You could connect the codec eval board to any of the bf5xx boards.

Quoted 17 lines

But it's about the same as all the other drivers so...

Quoted 14 lines
sound/soc/blackfin/bf5xx-adau1701.c new file +14 -0
+static struct snd_soc_dai_link bf5xx_adau1701_dai[] = {
+	{
+		.name = "adau1701",
+		.stream_name = "adau1701",
+		.cpu_dai_name = "bfin-i2s.0",
+		.codec_dai_name = "adau1701",
+		.platform_name = "bfin-i2s-pcm-audio",
+		.codec_name = "adau1701.0-0034",
+		.ops = &bf5xx_adau1701_ops,
+	},
+	{
+		.name = "adau1701",
+		.stream_name = "adau1701",
+		.cpu_dai_name = "bfin-i2s.1",
Quoted 8 lines

sound/soc/blackfin/bf5xx-adau1701.c line 57

Quoted 5 lines
sound/soc/blackfin/bf5xx-adau1701.c new file +5 -0
+		.codec_dai_name = "adau1701",
+		.platform_name = "bfin-i2s-pcm-audio",
+		.codec_name = "adau1701.0-0034",
+		.ops = &bf5xx_adau1701_ops,
+	},

For example this mapping could vary between systems, and I guess there may be some possiblity that the CODEC I2C address could change.

The I2C address is specific to the add-on board and since there is only one adau1701 eval board it should be static.

- Lars

author maintainer
#18 lore raw
In reply to Mike Frysinger
Quoted 6 lines · Mike Frysinger
Quoted 1 line · Lars-Peter Clausen

+MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");

did you actually rewrite this thing from scratch ? seems like you should keep Cliff as the author in git/MODULE_AUTHOR, and then add your name to the s-o-b list and this macro.

Not from scratch, but I guess except for the register definitions and the copyright header not much of the original driver is left:
sound/soc/codecs/adau1701.c | 662 ++++++++++++++++++++++++-------------------

 1 files changed, 371 insertions(+), 291 deletions(-)
Quoted 5 lines

friendly git commits can easily be cherry picked from my tree for asoc stuff:
http://git.kernel.org/?p=linux/kernel/git/vapier/blackfin.git;a=summary
(see the "trunk" branch)
-mike

#4 lore raw

Re: [Device-drivers-devel] [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Mike Frysinger
Quoted 10 lines · Mike Frysinger
Quoted 4 lines · Mark Brown

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific.  It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

i know you keep complaining, but i honestly dont understand why this is undesirable. connecting a codec to a Blackfin is pretty much always the same. you pick a SPORT # and that's about it.

Only if you're looking at very basic boards - as soon as you start adding any external components on the boards like speaker amps, start handling jacks (with detection or without) or start dealing with more flexible CODEC devices with a wider range of connection possibilities the number of possibilities expands dramatically.

Quoted 3 lines

the spi cs and i2c address could differ (so maybe make that a field for the platform resources), but otherwise i dont see why people should have to copy & paste the same code to change all of 4 bytes.

Reusing code where there's similiarities is fine - Tegra is doing that for WM8903 based systems in a fairly tasteful fashion - but that's not really what this stuff feels like it is doing. For example, the SPORT selection and reset GPIO selection should be platform data not Kconfig options and drivers that explicitly say they're for a particular board in Kconfig should probably say so in code also.

#8 lore raw

Re: [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Lars-Peter Clausen
Quoted 7 lines · Lars-Peter Clausen
Quoted 4 lines · Mark Brown

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific. It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

Quoted 5 lines

I think this is due, that the codecs them-self sit on an add-on board to the bf5xx eval boards.
So you have two boards, the bf5xx eval board with has the codec eval board connected to it. That's why it it is kept so generic. You could connect the codec eval board to any of the bf5xx boards.

I'd be more happy with that if there were some indication in the code that this was for the standard Blackfin EVBs rather than all systems based on Blackfin.

#15 lore raw
In reply to Mike Frysinger
Quoted 7 lines · Mike Frysinger
Quoted 1 line · Mark Brown

Also someone should remonstrate with the hardware designers.

if there's things we can take back, i can forward them along. the last conversation i had with them sounded like they have no problem accepting feedback.

I was referring to the fact that different registers have different sizes which does rather complicate the code.

#19 lore raw
In reply to Lars-Peter Clausen
Quoted 4 lines · Lars-Peter Clausen
Quoted 3 lines · Mike Frysinger
Quoted 1 line · Lars-Peter Clausen

+MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");

Quoted 8 lines
Quoted 3 lines

did you actually rewrite this thing from scratch ?  seems like you should keep Cliff as the author in git/MODULE_AUTHOR, and then add your name to the s-o-b list and this macro.

Not from scratch, but I guess except for the register definitions and the copyright header not much of the original driver is left:
sound/soc/codecs/adau1701.c |  662 ++++++++++++++++++++++++-------------------

 1 files changed, 371 insertions(+), 291 deletions(-)

based purely on LoC, Cliff wrote 467, so you took that and punted 291 (62%) and then added 371. that leaves the final file with 32% Cliff and 68% you.

however, some of that was register renaming and shuffling between the adau1701.c and adau1701.h, and it's easier to start with a base and clean up than from scratch.

so i'm definitely not comfortable dropping Cliff's completely from the file and the log (which means he needs to be readded and made sure to be retained in all the other ADAU drivers going forward), and i'm not entirely sold about changing of the Author field in the git commit.

don't get me wrong ... i'm not a fanboi of Cliff or something, i just think credit is due to him for his work.
-mike
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#16 lore raw
In reply to Mark Brown
Quoted 10 lines · Mark Brown
Quoted 6 lines · Mike Frysinger
Quoted 1 line · Mark Brown

Also someone should remonstrate with the hardware designers.

if there's things we can take back, i can forward them along.  the last conversation i had with them sounded like they have no problem accepting feedback.

I was referring to the fact that different registers have different sizes which does rather complicate the code.

np. i'll forward that along. "uniform codec register sizes simplifies code". -mike
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#5 lore raw

Re: [Device-drivers-devel] [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Mark Brown
Quoted 11 lines · Mark Brown
Quoted 9 lines · Mike Frysinger
Quoted 4 lines · Mark Brown

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific.  It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

i know you keep complaining, but i honestly dont understand why this is undesirable.  connecting a codec to a Blackfin is pretty much always the same.  you pick a SPORT # and that's about it.

Quoted 5 lines

Only if you're looking at very basic boards - as soon as you start adding any external components on the boards like speaker amps, start handling jacks (with detection or without) or start dealing with more flexible CODEC devices with a wider range of connection possibilities the number of possibilities expands dramatically.

often times, people do have just basic needs, but i see what you mean.
i want the base driver to be flexible enough to handle all the base
changes (diff SPORT num and perhaps addresses), but anything beyond that i'd expect someone to write a custom driver. perhaps renaming the Kconfig description to be like "Basic Blackfin connection to XXX Codec" would be sufficient ? and then add a few more details to the help text ?

Quoted 10 lines
Quoted 3 lines

the spi cs and i2c address could differ (so maybe make that a field for the platform resources), but otherwise i dont see why people should have to copy & paste the same code to change all of 4 bytes.

Reusing code where there's similiarities is fine - Tegra is doing that for WM8903 based systems in a fairly tasteful fashion - but that's not really what this stuff feels like it is doing.  For example, the SPORT selection and reset GPIO selection should be platform data not Kconfig options and drivers that explicitly say they're for a particular board in Kconfig should probably say so in code also.

i absolutely agree with this 100%. i keep banging on our guys to get all Kconfig knobs thrown out and moved to proper resources, and some of it has, but not all of it just yet.
-mike
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author maintainer
#9 lore raw

Re: [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Mark Brown
Quoted 14 lines · Mark Brown
Quoted 7 lines · Lars-Peter Clausen
Quoted 4 lines · Mark Brown

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific. It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

Quoted 5 lines

I think this is due, that the codecs them-self sit on an add-on board to the bf5xx eval boards.
So you have two boards, the bf5xx eval board with has the codec eval board connected to it. That's why it it is kept so generic. You could connect the codec eval board to any of the bf5xx boards.

Quoted 3 lines

I'd be more happy with that if there were some indication in the code that this was for the standard Blackfin EVBs rather than all systems based on Blackfin.

I could rename the machine driver to bf5xx-adau1701-evb for v2.

- Lars

#6 lore raw

Re: [Device-drivers-devel] [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Mike Frysinger
Quoted 7 lines · Mike Frysinger

often times, people do have just basic needs, but i see what you mean.
i want the base driver to be flexible enough to handle all the base
changes (diff SPORT num and perhaps addresses), but anything beyond that i'd expect someone to write a custom driver. perhaps renaming the Kconfig description to be like "Basic Blackfin connection to XXX Codec" would be sufficient ? and then add a few more details to the help text ?

Yes, that's exactly the sort of thing I'd like to see. It shouldn't be that big a change to the code, it's more about making it clear that it's a 90% case driver rather than the only way to connect things up.

#20 lore raw
In reply to Mike Frysinger
Quoted 22 lines · Mike Frysinger
Quoted 4 lines · Lars-Peter Clausen
Quoted 3 lines · Mike Frysinger
Quoted 1 line · Lars-Peter Clausen

+MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");

Quoted 8 lines
Quoted 3 lines

did you actually rewrite this thing from scratch ?  seems like you should keep Cliff as the author in git/MODULE_AUTHOR, and then add your name to the s-o-b list and this macro.

Not from scratch, but I guess except for the register definitions and the copyright header not much of the original driver is left:
sound/soc/codecs/adau1701.c |  662 ++++++++++++++++++++++++-------------------

 1 files changed, 371 insertions(+), 291 deletions(-)

based purely on LoC, Cliff wrote 467, so you took that and punted 291 (62%) and then added 371.  that leaves the final file with 32% Cliff and 68% you.

however, some of that was register renaming and shuffling between the adau1701.c and adau1701.h, and it's easier to start with a base and clean up than from scratch.

Quoted 7 lines

so i'm definitely not comfortable dropping Cliff's completely from the file and the log (which means he needs to be readded and made sure to be retained in all the other ADAU drivers going forward), and i'm not entirely sold about changing of the Author field in the git commit.

don't get me wrong ... i'm not a fanboi of Cliff or something, i just think credit is due to him for his work.

to be clear, i'm like 50/50 on the git author field. maybe someone else here has an opinion, or you feel strongly enough that your rewrite supersedes his seeding work. but please send a v2 with updated source/changelog with his name in it.
-mike
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#10 lore raw

Re: [Device-drivers-devel] [alsa-devel] [PATCH 2/3] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Lars-Peter Clausen
Quoted 14 lines · Lars-Peter Clausen
Quoted 13 lines · Mark Brown
Quoted 11 lines · Lars-Peter Clausen
Quoted 4 lines · Mark Brown

So, I keep on complaining about the way these drivers are just generic to any random Blackfin plus CODEC combination rather than being board specific.  It'd be good if we could improve this, even adding something into the driver name to make it clear these are for the EVB would help.

I think this is due, that the codecs them-self sit on an add-on board to the bf5xx eval boards.
So you have two boards, the bf5xx eval board with has the codec eval board connected to it. That's why it it is kept so generic. You could connect the codec eval board to any of the bf5xx boards.

Quoted 5 lines
Quoted 3 lines

I'd be more happy with that if there were some indication in the code that this was for the standard Blackfin EVBs rather than all systems based on Blackfin.

I could rename the machine driver to bf5xx-adau1701-evb for v2.

i'd like to get away from "bf5xx" actually and start using "bfin". ive started doing this in some of the files, so let's not add more.

also, if we do decide to add more to the name, it should be closer to what ADI calls the actual product, so probably "bfin-eval-adau1701". although, once we push the SPORT # and I2C address to platform resources, this should work for more than just the eval. it'd fall into our "basic blackfin" category, so we'd only tweak the Kconfig desc/help text.
-mike

author maintainer
#21 lore raw
In reply to Mike Frysinger
Quoted 23 lines · Mike Frysinger
Quoted 22 lines · Mike Frysinger
Quoted 4 lines · Lars-Peter Clausen
Quoted 3 lines · Mike Frysinger
Quoted 1 line · Lars-Peter Clausen

+MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");

Quoted 8 lines
Quoted 3 lines

did you actually rewrite this thing from scratch ? seems like you should keep Cliff as the author in git/MODULE_AUTHOR, and then add your name to the s-o-b list and this macro.

Not from scratch, but I guess except for the register definitions and the copyright header not much of the original driver is left:
sound/soc/codecs/adau1701.c | 662 ++++++++++++++++++++++++-------------------

 1 files changed, 371 insertions(+), 291 deletions(-)

based purely on LoC, Cliff wrote 467, so you took that and punted 291 (62%) and then added 371. that leaves the final file with 32% Cliff and 68% you.

however, some of that was register renaming and shuffling between the adau1701.c and adau1701.h, and it's easier to start with a base and clean up than from scratch.

Quoted 8 lines
Quoted 7 lines

so i'm definitely not comfortable dropping Cliff's completely from the file and the log (which means he needs to be readded and made sure to be retained in all the other ADAU drivers going forward), and i'm not entirely sold about changing of the Author field in the git commit.

don't get me wrong ... i'm not a fanboi of Cliff or something, i just think credit is due to him for his work.

You have both the orignal driver and the new driver, so you can do the diff for yourself. You see that the lines unchanged are basically boilerplate code and stuff that you'll find in any ASoC driver. The diff to any random ASoC driver called adau1701.

But of course if you want to see his name as the author, you get his name as the author.

Quoted 4 lines

to be clear, i'm like 50/50 on the git author field. maybe someone else here has an opinion, or you feel strongly enough that your rewrite supersedes his seeding work. but please send a v2 with updated source/changelog with his name in it.

His name is already in the copyright header.

- Lars

#22 lore raw
Quoted 29 lines · Lars-Peter Clausen
Quoted 28 lines · Mike Frysinger
Quoted 27 lines · Mike Frysinger
Quoted 4 lines · Lars-Peter Clausen
Quoted 3 lines · Mike Frysinger
Quoted 1 line · Lars-Peter Clausen

+MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");

Quoted 8 lines
Quoted 3 lines

did you actually rewrite this thing from scratch ?  seems like you should keep Cliff as the author in git/MODULE_AUTHOR, and then add your name to the s-o-b list and this macro.

Not from scratch, but I guess except for the register definitions and the copyright header not much of the original driver is left:
sound/soc/codecs/adau1701.c |  662 ++++++++++++++++++++++++-------------------

 1 files changed, 371 insertions(+), 291 deletions(-)

based purely on LoC, Cliff wrote 467, so you took that and punted 291 (62%) and then added 371.  that leaves the final file with 32% Cliff and 68% you.

however, some of that was register renaming and shuffling between the adau1701.c and adau1701.h, and it's easier to start with a base and clean up than from scratch.

so i'm definitely not comfortable dropping Cliff's completely from the file and the log (which means he needs to be readded and made sure to be retained in all the other ADAU drivers going forward), and i'm not entirely sold about changing of the Author field in the git commit.

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

don't get me wrong ... i'm not a fanboi of Cliff or something, i just think credit is due to him for his work.

You have both the orignal driver and the new driver, so you can do the diff for yourself.

i did do that already which is why i commented on the register renaming

Quoted 2 lines

But of course if you want to see his name as the author, you get his name as the author.

if you feel strongly about it, then you may keep your name there

Quoted 6 lines
Quoted 4 lines

to be clear, i'm like 50/50 on the git author field.  maybe someone else here has an opinion, or you feel strongly enough that your rewrite supersedes his seeding work.  but please send a v2 with updated source/changelog with his name in it.

His name is already in the copyright header.

sorry, i missed that the first time. but also list him in MODULE_AUTHOR (i'll leave order preference to you). -mike
_______________________________________________
Alsa-devel mailing list [email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel