ASoC: SAMSUNG: Add Aquila sound driver
PATCH 1/1 ASoC: SAMSUNG: Add Aquila sound driver
This patch add sound support for the Aquila board based on S5PC110.
The Aquila board is based on Samsung SoC(S5PC110) and include WM8994 codec over I2Sv5 to support sound. As there is currently no driver for the I2Sv5, the code to use I2Sv5 is deleted on this patch.
After I2Sv5 driver is posted in a few weeks, I will post incremental patch which some codes for using I2Sv5. The owner of I2Sv5 said that he will post I2Sv5 driver after a few weeks.
The kind of jack is below states :
* SND_JACK_HEADPHONE
* SND_JACK_HEADSET
* SND_JACK_MECHANICAL
: When TV-OUT cable is inserted on Aquila board, the TV-OUT cable isn't connected to television.
* SND_JACK_AVOUT
: When TV-OUT cable is inserted on Aquila board, the TV-OUT cable is connected to television.
--- sound/soc/s3c24xx/Kconfig | 8 + sound/soc/s3c24xx/Makefile | 2 + sound/soc/s3c24xx/aquila_wm8994.c | 298 +++++++++++++++++++++++++++++++++++++ 3 files changed, 308 insertions(+), 0 deletions(-) create mode 100644 sound/soc/s3c24xx/aquila_wm8994.c
sound/soc/s3c24xx/Kconfig +8 -0
@@ -131,3 +131,11 @@ config SND_S3C64XX_SOC_SMARTQ depends on SND_S3C24XX_SOC && MACH_SMARTQ select SND_S3C64XX_SOC_I2S select SND_SOC_WM8750 + +config SND_S5PC110_SOC_AQUILA_WM8994 + tristate "SoC I2S Audio support for AQUILA - WM8994" + depends on SND_S3C24XX_SOC && MACH_AQUILA + select SND_SOC_WM8994 + help + Say Y if you want to add support for SoC audio on aquila + with the WM8994.
sound/soc/s3c24xx/Makefile +2 -0
@@ -30,6 +30,7 @@ snd-soc-s3c24xx-simtec-tlv320aic23-objs := s3c24xx_simtec_tlv320aic23.o snd-soc-smdk64xx-wm8580-objs := smdk64xx_wm8580.o snd-soc-smdk-wm9713-objs := smdk_wm9713.o snd-soc-s3c64xx-smartq-wm8987-objs := smartq_wm8987.o +snd-soc-aquila-wm8994-objs := aquila_wm8994.o obj-$(CONFIG_SND_S3C24XX_SOC_JIVE_WM8750) += snd-soc-jive-wm8750.o obj-$(CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -43,3 +44,4 @@ obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23) += snd-soc-s3c24xx-simtec-tlv32 obj-$(CONFIG_SND_S3C64XX_SOC_WM8580) += snd-soc-smdk64xx-wm8580.o obj-$(CONFIG_SND_SOC_SMDK_WM9713) += snd-soc-smdk-wm9713.o obj-$(CONFIG_SND_S3C64XX_SOC_SMARTQ) += snd-soc-s3c64xx-smartq-wm8987.o +obj-$(CONFIG_SND_S5PC110_SOC_AQUILA_WM8994) += snd-soc-aquila-wm8994.o
sound/soc/s3c24xx/aquila_wm8994.c new file +298 -0
298 lines not on this page · raw message
Signature · 1 line
1.6.3.3
Quoted 10 lines · Chanwoo Choi
This patch add sound support for the Aquila board based on S5PC110.
The Aquila board is based on Samsung SoC(S5PC110) and include WM8994 codec over I2Sv5 to support sound. As there is currently no driver for the I2Sv5, the code to use I2Sv5 is deleted on this patch.
After I2Sv5 driver is posted in a few weeks, I will post incremental patch which some codes for using I2Sv5. The owner of I2Sv5 said that he will post I2Sv5 driver after a few weeks.
I don't plan to create a copy of an almost copy of s3c64xx-i2s.c Please try to use the existing sound/soc/s3c24xx/s3c64xx-i2s-v4.c I intend to only enhance that code to enable features of 'v4', 'v5' etc.
Quoted 8 lines · Jassi Brar
Quoted 7 lines · Chanwoo Choi
This patch add sound support for the Aquila board based on S5PC110.
The Aquila board is based on Samsung SoC(S5PC110) and include WM8994 codec over I2Sv5 to support sound. As there is currently no driver for the I2Sv5, the code to use I2Sv5 is deleted on this patch.
Quoted 8 lines
Quoted 3 lines
After I2Sv5 driver is posted in a few weeks, I will post incremental patch which some codes for using I2Sv5. The owner of I2Sv5 said that he will post I2Sv5 driver after a few weeks.
I don't plan to create a copy of an almost copy of
s3c64xx-i2s.cPlease try to use the existingsound/soc/s3c24xx/s3c64xx-i2s-v4.cI intend to only enhance that code to enable features of 'v4', 'v5' etc.
As your comment, I did modify some codes to use sound/soc/s3c24xx/ s3c64xx-i2s-v4.c instead of I2Sv5. When I try to compile kernel with arch/arm/configs/s5pv210_defconfig.
sound/soc/s3c24xx/Kconfig +1 -0
@@ -135,6 +135,7 @@ config SND_S3C64XX_SOC_SMARTQ config SND_S5PC110_SOC_AQUILA_WM8994 tristate "SoC I2S Audio support for AQUILA - WM8994" depends on SND_S3C24XX_SOC && MACH_AQUILA + select SND_S3C64XX_SOC_I2S_V4 select SND_SOC_WM8994 help Say Y if you want to add support for SoC audio on aquila
sound/soc/s3c24xx/s3c-i2s-v2.c +2 -1
@@ -32,7 +32,8 @@#undef S3C_IIS_V2_SUPPORTED -#if defined(CONFIG_CPU_S3C2412 ) || defined(CONFIG_CPU_S3C2413 ) +#if defined(CONFIG_CPU_S3C2412 ) || defined(CONFIG_CPU_S3C2413 ) \ + || defined(CONFIG_CPU_S5PV210 )#define S3C_IIS_V2_SUPPORTED #endif
When compiling kernel, it is occurred below error because arch/arm/mach-s5pv210/include/mach/gpio-bank-*.h file isn't included to upstream kernel.
sound/soc/s3c34xx/s3c64xx-i2s-v4.c included the header files in arch/arm/mach-s3c64xx/include/*.
What is your opinion for this error?
- compile error log :
CHK include/generated/compile.h
CC sound/soc/s3c24xx/s3c64xx-i2s-v4.osound/soc/s3c24xx/s3c64xx-i2s-v4.c:19: fatal error:mach/gpio-bank-c.h:
No such file or directory
Thank you,
Chanwoo Choi
Quoted 22 lines · Chanwoo Choi
Quoted 8 lines · Jassi Brar
Quoted 7 lines · Chanwoo Choi
This patch add sound support for the Aquila board based on S5PC110.
The Aquila board is based on Samsung SoC(S5PC110) and include WM8994 codec over I2Sv5 to support sound. As there is currently no driver for the I2Sv5, the code to use I2Sv5 is deleted on this patch.
Quoted 8 lines
Quoted 3 lines
After I2Sv5 driver is posted in a few weeks, I will post incremental patch which some codes for using I2Sv5. The owner of I2Sv5 said that he will post I2Sv5 driver after a few weeks.
I don't plan to create a copy of an almost copy of
s3c64xx-i2s.cPlease try to use the existingsound/soc/s3c24xx/s3c64xx-i2s-v4.cI intend to only enhance that code to enable features of 'v4', 'v5' etc.As your comment, I did modify some codes to use
sound/soc/s3c24xx/s3c64xx-i2s-v4.cinstead of I2Sv5. When I try to compile kernel witharch/arm/configs/s5pv210_defconfig.
.....
Quoted 8 lines
When compiling kernel, it is occurred below error because
arch/arm/mach-s5pv210/include/mach/gpio-bank-*.hfile isn't included to upstream kernel.
sound/soc/s3c34xx/s3c64xx-i2s-v4.cincluded the header files inarch/arm/mach-s3c64xx/include/*.
Quoted 7 lines
What is your opinion for this error?
- compile error log :
CHKinclude/generated/compile.h
CC sound/soc/s3c24xx/s3c64xx-i2s-v4.osound/soc/s3c24xx/s3c64xx-i2s-v4.c:19: fatal error:mach/gpio-bank-c.h:
No such file or directory
The gpio config stuff needs to be removed from the CPU driver. It was pending due to fear of cross-tree merge issues. The platform specific code to do the same is already upstream now.
One engineer in my team is already looking into it while testing Liam's multi-codec
changes.
Quoted 1 line
Quoted 1 line
Please try to use the existing
sound/soc/s3c24xx/s3c64xx-i2s-v4.c
'try to' is the key word here. The driver is not expected to work rightaway. One might need to make some changes to the CPU driver to just make it work on platforms with very similar IP.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 3 lines · Jassi Brar
The gpio config stuff needs to be removed from the CPU driver. It was pending due to fear of cross-tree merge issues. The platform specific code to do the same is already upstream now.
What is "platform specific code to the same" ?
Quoted 8 lines
One engineer in my team is already looking into it while testing Liam's multi-codec
changes.Quoted 1 line
Quoted 1 line
Please try to use the existing
sound/soc/s3c24xx/s3c64xx-i2s-v4.c'try to' is the key word here. The driver is not expected to work rightaway. One might need to make some changes to the CPU driver to just make it work on platforms with very similar IP.
Do you mean that I should implement i2sv5 drvier refer to the sound/soc/s3c24xx/s3c64xx-i2s-v4.c after completing cross-tree merge issue?
Thank you,
Chanwoo Choi
Quoted 6 lines · Chanwoo Choi
Jassi Brar wrote:
> The gpio config stuff needs to be removed from the CPU driver. It was pendingQuoted 2 lines
due to fear of cross-tree merge issues. The platform specific code to do the same is already upstream now.
What is "platform specific code to the same" ?
Have a look at arch/arm/mach-s3c64xx/dev-audio.c which has various cfg_gpio callback functions.
Quoted 11 lines
Quoted 8 lines
One engineer in my team is already looking into it while testing Liam's multi-codec
changes.Quoted 1 line
Quoted 1 line
Please try to use the existing
sound/soc/s3c24xx/s3c64xx-i2s-v4.c'try to' is the key word here. The driver is not expected to work rightaway. One might need to make some changes to the CPU driver to just make it work on platforms with very similar IP.
Do you mean that I should implement i2sv5 drvier refer to the
sound/soc/s3c24xx/s3c64xx-i2s-v4.cafter completing cross-tree merge issue?
No. I mean you should make minimal changes to the existing i2s CPU drivers to make them just work for your machine. Aquila can exploit more advanced features
of v4/v5 as they will be implemented in future.
If you don't wanna wait, you may start upgrading the existing drivers in line with
existing frame work.
Please remember, the goal is towards having as least files as possible in Samsung ASoC which supporting as many SoCs as possible. Separate driver for V5 maybe warranted only when we want to implement a feature that is not supported by v4.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 6 lines · Chanwoo Choi
This patch add sound support for the Aquila board based on S5PC110.
The Aquila board is based on Samsung SoC(S5PC110) and include WM8994 codec over I2Sv5 to support sound. As there is currently no driver for the I2Sv5, the code to use I2Sv5 is deleted on this patch.
This looks good from my point of view, though I'm not sure if you want to do any updates for Jassi's comments and Liam also needs to review still.
One other thing that you might want to do - I'm not sure if you noticed but there is now an API call snd_soc_dapm_ignore_suspend() which allows audio paths to be kept up while the system is suspended, intended for use in cases like voice calls on mobile phones where audio is running even though the Linux system is suspended. To use this you should mark all DAPM endpoints which can be live over suspend as ignoring suspend then ASoC should transparently keep any paths between endpoints marked this way up.
Quoted 12 lines · Mark Brown
Quoted 6 lines · Chanwoo Choi
This patch add sound support for the Aquila board based on S5PC110.
The Aquila board is based on Samsung SoC(S5PC110) and include WM8994 codec over I2Sv5 to support sound. As there is currently no driver for the I2Sv5, the code to use I2Sv5 is deleted on this patch.
This looks good from my point of view, though I'm not sure if you want to do any updates for Jassi's comments and Liam also needs to review still.
Ok, I am talking about using I2Sv5 with Jassi. Also, Should I specially send this patch to review to Liam? or What is another way to review?
Quoted 8 lines
One other thing that you might want to do - I'm not sure if you noticed but there is now an API call
snd_soc_dapm_ignore_suspend()which allows audio paths to be kept up while the system is suspended, intended for use in cases like voice calls on mobile phones where audio is running even though the Linux system is suspended. To use this you should mark all DAPM endpoints which can be live over suspend as ignoring suspend then ASoC should transparently keep any paths between endpoints marked this way up.
I see that your mentioned patcth.
But,
before I had received the patch to keep audio path on suspend, to execute voice-call on suspend implemented that the state of LDO of codec is kept high to run audio in cases voice call while the Linux system is suspended.
I will try to find your mentioned patch and check to apply the sound driver of Aquila board.
Thank you,
Chanwoo Choi
Quoted 1 line · Chanwoo Choi
Also, Should I specially send this patch to review to Liam?
Yes, you should always CC all maintainers when submitting patches.
Quoted 6 lines · Mark Brown
Quoted 1 line · Chanwoo Choi
Also, Should I specially send this patch to review to Liam?
Yes, you should always CC all maintainers when submitting patches.
Ok, I will do in future.
Thank you for your comment.
Dear Mark,
Liam reviewed this patch.(Thank you for your review.)
The upstream kernel include i2s CPU drivers excepts for i2sv5 CPU driver. I should upgrade existing i2s CPU drivers to support i2s operation for sound on Aquila board, becuase the sound driver on Aquila board to need i2sv5 CPU driver.
I have a question.
After upgrading existing i2s CPU drivers to run sound on Aquila board, Should I post this patch to upstream kernel?
Or,
Now, I post this patch which haven't used i2sv5 CPU driver to upstream kernel. Then, I will implement it and post incremental patch using it to run on Aquila board.
Could you give me the opinion about this question?
Thank you,
Chanwoo Choi
Quoted 8 lines · Chanwoo Choi
After upgrading existing i2s CPU drivers to run sound on Aquila board, Should I post this patch to upstream kernel?
Or,
Now, I post this patch which haven't used i2sv5 CPU driver to upstream kernel. Then, I will implement it and post incremental patch using it to run on Aquila board.Could you give me the opinion about this question?
I think whatever is easiest for you guys is fine - whatever is done in the board specific code is only really going to impact people who have Aquilla boards so the main thing is it makes sense to those people.
Liam Girdwood
Acked-byQuoted 5 lines · Mark Brown
Quoted 1 line · Chanwoo Choi
Also, Should I specially send this patch to review to Liam?
Yes, you should always CC all maintainers when submitting patches.
I'm happy enough with this too.
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk