Skip to contentSkip to conversation

ASoC: Tegra machine ASoC driver for boards using ALC5332 codec

PATCH Applied Leon Romanovsky 5 participants 18 messages Dec 19, 2011 – Dec 20, 2011

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

PATCH v3 1/1 ASoC: Tegra machine ASoC driver for boards using ALC5332 codec

At this stage only Toshiba AC100/Dynabook supported.

--
Changes since v2:
* Remove unsupported frequencies (more then 48Khz) - Suggested by Stephen Warren
* Remove GPIO related code, it will be added later by platform_data patchset. Changes since v1:
* Use module_platform_driver.
* Move controls, dapm_widgets and dapm_routes to snd_soc_card structure.
* Set dai_fmt in snd_soc_dai_link structure instead probe function.
* Remove check board in probe function
* Fix warning about unused codec_dai.
* Use devm_kzalloc to manage memory allocation.

---
 sound/soc/tegra/Kconfig         |    9 ++
 sound/soc/tegra/Makefile        |    2 +
 sound/soc/tegra/tegra_alc5632.c |  233 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/tegra/tegra_alc5632.c
sound/soc/tegra/Kconfig +9 -0
index c6af1fd..ce1b773 100644
@@ -47,3 +47,12 @@ config SND_SOC_TEGRA_TRIMSLICE
 	help
 	  Say Y or M here if you want to add support for SoC audio on the
 	  TrimSlice platform.
+
+config SND_SOC_TEGRA_ALC5632
+       tristate "SoC Audio support for Tegra boards using an ALC5632 codec"
+       depends on SND_SOC_TEGRA && I2C
+       select SND_SOC_TEGRA_I2S
+       select SND_SOC_ALC5632
+       help
+         Say Y or M here if you want to add support for SoC audio on the
+         Toshiba AC100 netbook.
sound/soc/tegra/Makefile +2 -0
index 4d943b3..8e584b8 100644
@@ -14,6 +14,8 @@ obj-$(CONFIG_SND_SOC_TEGRA_SPDIF) += snd-soc-tegra-spdif.o
 # Tegra machine Support
 snd-soc-tegra-wm8903-objs := tegra_wm8903.o
 snd-soc-tegra-trimslice-objs := trimslice.o
+snd-soc-tegra-alc5632-objs := tegra_alc5632.o
 
 obj-$(CONFIG_SND_SOC_TEGRA_WM8903) += snd-soc-tegra-wm8903.o
 obj-$(CONFIG_SND_SOC_TEGRA_TRIMSLICE) += snd-soc-tegra-trimslice.o
+obj-$(CONFIG_SND_SOC_TEGRA_ALC5632) += snd-soc-tegra-alc5632.o
sound/soc/tegra/tegra_alc5632.c new file +213 -0

213 lines not on this page · raw message

Signature · 1 line
1.7.3.4
Acked-by on v3 1/1
#1 lore raw

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Quoted 4 lines

At this stage only Toshiba AC100/Dynabook supported.

I also attempted to test this, but couldn't persuade any audio to come out. What more do I need to test this, beyond the obvious addition of platform device registration and clocks to board-paz00.c? Thanks.

Signature · 1 line
nvpublic
#2 lore raw
Quoted 11 lines · Stephen Warren

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Quoted 4 lines

At this stage only Toshiba AC100/Dynabook supported.

I also attempted to test this, but couldn't persuade any audio to come out. What more do I need to test this, beyond the obvious addition of platform device registration and clocks to board-paz00.c? Thanks.

I believe the NVEC you used (from staging tree) is not the latest version I have. If I forget something, the working sound is available at https://gitorious.org/~leonro/ac100/leonro-marvin24s-kernel

Before, I'm going to start pushing other parts of the audio, how do I need to handle cross-tree patches ? For example I'll need to update NVEC (staging tree) and platform_device (tegra and ASoC) On which tree do I base my patches?

Quoted 4 lines

--
nvpublic

Signature · 6 lines
Leon Romanovsky | Independent Linux Consultant
        www.leon.nu | [email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#3 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoC driver forboards using ALC5332 codec

Am Dienstag, 20. Dezember 2011, 08:45:39 schrieb Leon Romanovsky:

Quoted 12 lines · Stephen Warren
Quoted 11 lines

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Quoted 4 lines

At this stage only Toshiba AC100/Dynabook supported.

I also attempted to test this, but couldn't persuade any audio to come out. What more do I need to test this, beyond the obvious addition of platform device registration and clocks to board-paz00.c? Thanks.

I'm also going to try it on linux-next in the evening. Maybe it is just some mixer setting which is wrong.

Quoted 3 lines

I believe the NVEC you used (from staging tree) is not the latest version I have. If I forget something, the working sound is available at https://gitorious.org/~leonro/ac100/leonro-marvin24s-kernel

There are only minor differences which shouldn't affect sound, e.g. the amplifier is switched on in nvec.c (nvec_events.c in our tree) - but that shouldn't matter.

Quoted 4 lines

Before, I'm going to start pushing other parts of the audio, how do I need to handle cross-tree patches ? For example I'll need to update NVEC (staging tree) and platform_device (tegra and ASoC) On which tree do I base my patches?

If you have updates to other files beside the audio stuff (nvec or board stuff), you need to CC the relevant maintainers (see scripts/get_maintainer.pl).

Marc

#4 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoC driver forboards using ALC5332 codec

Quoted 10 lines · Marc Dietrich

Am Dienstag, 20. Dezember 2011, 08:45:39 schrieb Leon Romanovsky:

Quoted 6 lines · Stephen Warren
Quoted 1 line

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Before, I'm going to start pushing other parts of the audio, how do I need to handle cross-tree patches ? For example I'll need to update NVEC (staging tree) and platform_device (tegra and ASoC) On which tree do I base my patches?

If you have updates to other files beside the audio stuff (nvec or board stuff), you need to CC the relevant maintainers (see scripts/get_maintainer.pl).

Different trees have different file versions, this is why i'm asking "on which tree do I base my patches?"

Quoted 2 lines

Marc

Signature · 6 lines
Leon Romanovsky | Independent Linux Consultant
        www.leon.nu | [email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#5 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoC driver forboards using ALC5332 codec

Quoted 7 lines · Leon Romanovsky
Quoted 2 lines · Marc Dietrich

If you have updates to other files beside the audio stuff (nvec or board stuff), you need to CC the relevant maintainers (see scripts/get_maintainer.pl).

Different trees have different file versions, this is why i'm asking "on which tree do I base my patches?"

It depends on what you're doing, what (if anything) the interdependencies are and sometimes where we are in the development cycle.

#6 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoC driverforboards using ALC5332 codec

In reply to Leon Romanovsky

Am Dienstag, 20. Dezember 2011, 13:05:50 schrieb Leon Romanovsky:

Quoted 9 lines · Marc Dietrich
Quoted 8 lines

Am Dienstag, 20. Dezember 2011, 08:45:39 schrieb Leon Romanovsky:

Quoted 6 lines · Stephen Warren
Quoted 1 line

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Before, I'm going to start pushing other parts of the audio, how do I need to handle cross-tree patches ? For example I'll need to update NVEC (staging tree) and platform_device (tegra and ASoC) On which tree do I base my patches?

Quoted 6 lines
Quoted 3 lines

If you have updates to other files beside the audio stuff (nvec or board stuff), you need to CC the relevant maintainers (see scripts/get_maintainer.pl).

Different trees have different file versions, this is why i'm asking "on which tree do I base my patches?"

ok, I think patches for upstream should be based on the relevant subsystem trees (e.g. sound (git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git), board (arm-soc
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git) and nvec (
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git). One may correct me where I'm wrong.

I know it is hard to test changes this way, but that's a common problem. I often use linux-next to create and test the patches and rebase them to the relevant subsystem trees before submitting. Maybe there is a better solution for it...

Marc

#7 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoC driverforboards using ALC5332 codec

Quoted 17 lines · Marc Dietrich

Am Dienstag, 20. Dezember 2011, 13:05:50 schrieb Leon Romanovsky:

Quoted 9 lines · Marc Dietrich
Quoted 8 lines

Am Dienstag, 20. Dezember 2011, 08:45:39 schrieb Leon Romanovsky:

Quoted 6 lines · Stephen Warren
Quoted 1 line

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Before, I'm going to start pushing other parts of the audio, how do I need to handle cross-tree patches ? For example I'll need to update NVEC (staging tree) and platform_device (tegra and ASoC) On which tree do I base my patches?

Quoted 6 lines
Quoted 3 lines

If you have updates to other files beside the audio stuff (nvec or board stuff), you need to CC the relevant maintainers (see scripts/get_maintainer.pl).

Different trees have different file versions, this is why i'm asking "on which tree do I base my patches?"

Quoted 6 lines

ok, I think patches for upstream should be based on the relevant subsystem trees (e.g. sound (git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git), board (arm-soc
 git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git) and nvec (
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git). One may correct me where I'm wrong.

And how will you ensure that the proposed patches will compile well? For example, Mark applied the tegra_alc5632.c patch into ASoC tree, but in tegra tree this file still doesn't exist, so any my attempt to link board-paz00.c (tegra tree) with tegra_alc5632. will lead to compile failures.

Quoted 9 lines

I know it is hard to test changes this way, but that's a common problem. I often use linux-next to create and test the patches and rebase them to the relevant subsystem trees before submitting. Maybe there is a better solution for it...

Marc

Signature · 6 lines
Leon Romanovsky | Independent Linux Consultant
        www.leon.nu | [email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#8 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoCdriverforboards using ALC5332 codec

Am Dienstag, 20. Dezember 2011, 14:11:01 schrieb Leon Romanovsky:

Quoted 26 lines · Marc Dietrich
Quoted 17 lines

Am Dienstag, 20. Dezember 2011, 13:05:50 schrieb Leon Romanovsky:

Quoted 9 lines · Marc Dietrich
Quoted 8 lines

Am Dienstag, 20. Dezember 2011, 08:45:39 schrieb Leon Romanovsky:

Quoted 6 lines · Stephen Warren
Quoted 1 line

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Before, I'm going to start pushing other parts of the audio, how do I need to handle cross-tree patches ? For example I'll need to update NVEC (staging tree) and platform_device (tegra and ASoC) On which tree do I base my patches?

Quoted 6 lines
Quoted 3 lines

If you have updates to other files beside the audio stuff (nvec or board stuff), you need to CC the relevant maintainers (see scripts/get_maintainer.pl).

Different trees have different file versions, this is why i'm asking "on which tree do I base my patches?"

Quoted 7 lines

ok, I think patches for upstream should be based on the relevant subsystem trees
(e.g. sound (git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git),
board (arm-soc
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git) and nvec (
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git). One may correct me where I'm wrong.

Quoted 5 lines

And how will you ensure that the proposed patches will compile well? For example, Mark applied the tegra_alc5632.c patch into ASoC tree, but in tegra tree this file still doesn't exist, so any my attempt to link board-paz00.c (tegra tree) with tegra_alc5632. will lead to compile failures.

test with e.g. linux-next, *submit early* to the subsystems and fix breakage later on.

Quoted 6 lines
Quoted 6 lines

I know it is hard to test changes this way, but that's a common problem. I often use linux-next to create and test the patches and rebase them to the relevant subsystem trees before submitting. Maybe there is a better solution for it...

Marc

#9 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoCdriverforboards using ALC5332 codec

Marc Dietrich wrote at Tuesday, December 20, 2011 5:39 AM:

Quoted 27 lines

Am Dienstag, 20. Dezember 2011, 14:11:01 schrieb Leon Romanovsky:

Quoted 26 lines · Marc Dietrich
Quoted 24 lines

Am Dienstag, 20. Dezember 2011, 13:05:50 schrieb Leon Romanovsky:

Quoted 9 lines · Marc Dietrich
Quoted 8 lines

Am Dienstag, 20. Dezember 2011, 08:45:39 schrieb Leon Romanovsky:

Quoted 6 lines · Stephen Warren
Quoted 1 line

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Before, I'm going to start pushing other parts of the audio, how do I need to handle cross-tree patches ? For example I'll need to update NVEC (staging tree) and platform_device (tegra and ASoC) On which tree do I base my patches?

Quoted 6 lines
Quoted 3 lines

If you have updates to other files beside the audio stuff (nvec or board stuff), you need to CC the relevant maintainers (see scripts/get_maintainer.pl).

Different trees have different file versions, this is why i'm asking "on which tree do I base my patches?"

ok, I think patches for upstream should be based on the relevant subsystem trees
(e.g. sound (git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git),
board (arm-soc
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git) and nvec (
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git). One may correct me where I'm wrong.

Quoted 8 lines
Quoted 5 lines

And how will you ensure that the proposed patches will compile well? For example, Mark applied the tegra_alc5632.c patch into ASoC tree, but in tegra tree this file still doesn't exist, so any my attempt to link board-paz00.c (tegra tree) with tegra_alc5632. will lead to compile failures.

test with e.g. linux-next, *submit early* to the subsystems and fix breakage later on.

Well, we should strive to avoid creating any breakage in the first place; if you break anything, that means "git bisect" will stop working, which might make tracking down other problems a pain.

In this case, I think the patches you need to the Tegra tree don't have any dependencies on the ALSA/ASoC tree; you're basically only registering some platform devices, and you can register those irrespective of whether drivers exist for those devices or not yet.

Put another way, registering the devices in the Tegra tree without the ASoC changes being present will be pretty much a harmless no-op. Having the drivers present in the ASoC tree without any platform devices being registered to instantiate them will also be a harmless no-op. Once both sets of changes meet (in linux-next, or a Linus tree), they'll interact and cause audio to start working.

The only dependency you'll have is the addition of the platform data header file, which needs to be in both trees to compile the board file and the driver, but you haven't created this file yet, so there's no problem to date. In the past, Mark and I have handled this by:

* Create a patch that does nothing but add the pdata header file.
* Put that patch in a branch of its own.
* Merge that branch into both the Tegra tree and the ASoC tree before any changes that use the header file.

But there are other ways to handle this too. Given all the work in the Tegra tree right now though, that way is probably the simplest for everyone to deal with.

Signature · 1 line
nvpublic
#10 lore raw

Re: [PATCH v3] ASoC: Tegra machine ASoC driverforboards using ALC5332 codec

In reply to Leon Romanovsky
Quoted 5 lines · Leon Romanovsky

And how will you ensure that the proposed patches will compile well? For example, Mark applied the tegra_alc5632.c patch into ASoC tree, but in tegra tree this file still doesn't exist, so any my attempt to link board-paz00.c (tegra tree) with tegra_alc5632. will lead to compile failures.

Again, without seeing what (if any) the dependencies are and what the issues are it's hard to say exactly what should happen. For simple things often all the patches get merged via one tree.

#11 lore raw
In reply to Leon Romanovsky

Leon Romanovsky wrote at Monday, December 19, 2011 11:46 PM:

Quoted 9 lines · Stephen Warren
Quoted 8 lines

Leon Romanovsky wrote at Monday, December 19, 2011 12:52 PM:

Quoted 4 lines

At this stage only Toshiba AC100/Dynabook supported.

Quoted 7 lines
Quoted 3 lines

I also attempted to test this, but couldn't persuade any audio to come out. What more do I need to test this, beyond the obvious addition of platform device registration and clocks to board-paz00.c? Thanks.

I believe the NVEC you used (from staging tree) is not the latest version I have. If I forget something, the working sound is available at https://gitorious.org/~leonro/ac100/leonro-marvin24s-kernel

Ah right, I didn't have the NVEC driver enabled, so I'll try again...

Signature · 1 line
nvpublic
#13 lore raw

20 декабря 2011, 04:42 от Mark Brown <[email protected]>:

Quoted 7 lines · Leon Romanovsky
Quoted 4 lines

At this stage only Toshiba AC100/Dynabook supported.

Applied, thanks.

There is a little typo - must be alc5632 instead alc5332

Quoted 11 lines
Quoted 3 lines

--
Changes since v2:

Please follow the format in SubmittingPatches - the above needs to be --- not --.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#14 lore raw
Quoted 11 lines · Andrey Danin

20 декабря 2011, 04:42 от Mark Brown <[email protected]>:

Quoted 7 lines · Leon Romanovsky
Quoted 4 lines

At this stage only Toshiba AC100/Dynabook supported.

Applied, thanks.

There is a little typo - must be alc5632 instead of alc5332

Mark, what is the way to fix this type of typo?

Quoted 11 lines
Quoted 11 lines
Quoted 3 lines

--
Changes since v2:

Please follow the format in SubmittingPatches - the above needs to be --- not --.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 6 lines
Leon Romanovsky | Independent Linux Consultant
        www.leon.nu | [email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#15 lore raw
Quoted 5 lines · Leon Romanovsky
Quoted 1 line · Andrey Danin

There is a little typo - must be alc5632 instead of alc5332

Mark, what is the way to fix this type of typo?

In the changelog? There isn't one.

#16 lore raw
Quoted 8 lines · Mark Brown
Quoted 5 lines · Leon Romanovsky
Quoted 1 line · Andrey Danin

There is a little typo - must be alc5632 instead of alc5332

Mark, what is the way to fix this type of typo?

In the changelog?  There isn't one.

In the subject line.

Signature · 6 lines
Leon Romanovsky | Independent Linux Consultant
        www.leon.nu | [email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#17 lore raw
Quoted 5 lines · Leon Romanovsky

On Tue, Dec 20, 2011 at 13:10, Mark Brown

Quoted 1 line

In the changelog?  There isn't one.

In the subject line.

Yes, that's part of the changelog - you can't update them retroactively.