SMDK64XX I2S: Added machine driver for WM8580
PATCH 1/1 SMDK64XX I2S: Added machine driver for WM8580
New machine driver for WM8580 I2S i/f on SMDK64XX.
By default SoC-Slave is set and WM8580 is configured to use it's PLLA to generate clocks from a 12MHz crystal attached to WM8580.
--- sound/soc/s3c24xx/Kconfig | 8 + sound/soc/s3c24xx/Makefile | 2 + sound/soc/s3c24xx/smdk64xx_wm8580.c | 283 +++++++++++++++++++++++++++++++++++ 3 files changed, 293 insertions(+), 0 deletions(-) create mode 100644 sound/soc/s3c24xx/smdk64xx_wm8580.c
sound/soc/s3c24xx/Kconfig +8 -0
@@ -56,6 +56,14 @@ config SND_S3C24XX_SOC_JIVE_WM8750 help Sat Y if you want to add support for SoC audio on the Jive. +config SND_S3C64XX_SOC_WM8580 + tristate "SoC I2S Audio support for WM8580 on SMDK64XX" + depends on SND_S3C24XX_SOC && (MACH_SMDK6400 || MACH_SMDK6410) + select SND_SOC_WM8580 + select SND_S3C64XX_SOC_I2S + help + Sat Y if you want to add support for SoC audio on the SMDK64XX. + config SND_S3C24XX_SOC_SMDK2443_WM9710 tristate "SoC AC97 Audio support for SMDK2443 - WM9710" depends on SND_S3C24XX_SOC && MACH_SMDK2443
sound/soc/s3c24xx/Makefile +2 -0
@@ -23,6 +23,7 @@ snd-soc-s3c24xx-uda134x-objs := s3c24xx_uda134x.o snd-soc-s3c24xx-simtec-objs := s3c24xx_simtec.o snd-soc-s3c24xx-simtec-hermes-objs := s3c24xx_simtec_hermes.o snd-soc-s3c24xx-simtec-tlv320aic23-objs := s3c24xx_simtec_tlv320aic23.o +snd-soc-smdk64xx-wm8580-objs := smdk64xx_wm8580.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
@@ -33,4 +34,5 @@ obj-$(CONFIG_SND_S3C24XX_SOC_S3C24XX_UDA134X) += snd-soc-s3c24xx-uda134x.o obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC) += snd-soc-s3c24xx-simtec.o obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_HERMES) += snd-soc-s3c24xx-simtec-hermes.o obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23) += snd-soc-s3c24xx-simtec-tlv320aic23.o +obj-$(CONFIG_SND_S3C64XX_SOC_WM8580) += snd-soc-smdk64xx-wm8580.o
sound/soc/s3c24xx/smdk64xx_wm8580.c new file +283 -0
283 lines not on this page · raw message
Signature · 1 line
1.6.2.5
Quoted 5 lines · jassi brar
New machine driver for WM8580 I2S i/f on SMDK64XX.
By default SoC-Slave is set and WM8580 is configured to use it's PLLA to generate clocks from a 12MHz crystal attached to WM8580.Signed-off-by Jassi <[email protected]>
I've applied this with a couple of additional fixups below. I've added a dependency on BROKEN since the IISv4 support is not yet present so there's no chance of it working yet.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +#define S3C64XX_I2S_V4 2
This should be defined by the DAI driver, every user is going to need it.
sound/soc/s3c24xx/smdk64xx_wm8580.c line 142
Quoted 8 lines
sound/soc/s3c24xx/smdk64xx_wm8580.c new file +8
-0+static int smdk64xx_hw_free (struct snd_pcm_substream *substream) +{ +struct snd_soc_pcm_runtime *rtd = substream->private_data; +struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; + +/* disable the PLL */ +return snd_soc_dai_set_pll (codec_dai,WM8580_PLLA ,0 ,0 ); +}
Doing this will break simultaneous playback and record - whichever of them stops first will stop the PLL, removing the clock from the other. I've removed the hw_free() function as a result.
I also note that you're not submitting and testing against the latest ASoC code since the PLL API has been updated so that this won't build. I've fixed it up this time but please do try to ensure you're working with the latest code when submitting patches.
Quoted 10 lines · Mark Brown
Quoted 5 lines · jassi brar
New machine driver for WM8580 I2S i/f on SMDK64XX.
By default SoC-Slave is set and WM8580 is configured to use it's PLLA to generate clocks from a 12MHz crystal attached to WM8580.Signed-off-by Jassi <[email protected]>I've applied this with a couple of additional fixups below. I've added a dependency on BROKEN since the IISv4 support is not yet present so there's no chance of it working yet.
well, i sent patches for CPU support also. they are simply put on hold until something is decided. if i were given a suggestion atleast i cud try doing that. anyways, the machine driver will almost remain the same in future when we the CPU support is there.
Quoted 4 lines
Quoted 4 lines
sound/soc/s3c24xx/smdk64xx_wm8580.c new file +4
-0+static int smdk64xx_hw_free (struct snd_pcm_substream *substream) +{ + struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
Quoted 8 lines
sound/soc/s3c24xx/smdk64xx_wm8580.c line 142
Quoted 4 lines
sound/soc/s3c24xx/smdk64xx_wm8580.c new file +4
-0+ + /* disable the PLL */ + return snd_soc_dai_set_pll(codec_dai, WM8580_PLLA, 0, 0); +}Doing this will break simultaneous playback and record - whichever of them stops first will stop the PLL, removing the clock from the other. I've removed the
hw_free()function as a result.
thank you. I didn't check full-duplex.
Quoted 4 lines
I also note that you're not submitting and testing against the latest ASoC code since the PLL API has been updated so that this won't build. I've fixed it up this time but please do try to ensure you're working with the latest code when submitting patches.
I did see for-2.6.33 tree but wasn't sure when i shud start submitting against that.
It was only 2.6.32 when i started. And i tested playback/capture @ all supported rates
in that version.
I am new to the process, please bear this time. Please reject a patch and suggest how to do, if it's too much work for you.
Btw, I understand as soon as i see a newer for-2.6.xx branch i shud start submitting against that. Right?
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 10 lines · jassi brar
On Sun, Sep 20, 2009 at 1:08 AM, Mark Brown
Quoted 3 lines
I've applied this with a couple of additional fixups below. I've added a dependency on BROKEN since the IISv4 support is not yet present so there's no chance of it working yet.
well, i sent patches for CPU support also. they are simply put on hold until something is decided. if i were given a suggestion atleast i cud try doing that. anyways, the machine driver will almost remain the same in future when we the CPU support is there.
I think there was enough feedback on the CPU patches? IIRC the main issues were that the driver will need some way to tell that it's an IISv4 block (which it would be able to do with the existing arch/arm but not with the patches you sent) and that the audio-bus clock has to be idmplemented so that the driver can probe (or the driver will need to be able to carry on if it can't get the clock).
Quoted 2 lines
I did see for-2.6.33 tree but wasn't sure when i shud start submitting against that.
As a rule new features should be submitted against the newest branch for a given subsystem - if there's an older branch it will normally be bug fix only.
Quoted 2 lines
Btw, I understand as soon as i see a newer for-2.6.xx branch i shud start submitting against that. Right?
For new features, yes. Bug fixes should be done against the version destined for Linus' current tree if the issue applies there.
Let me clarify, just in case,
The patch-2/10
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-September/000714.html
enables this MACHINE driver to run 2 channels(of the 6 possible) of the I2S-v4 with
the extant S3C CPU drivers, which do the job fine.
The extant CPU drivers are inadequate only if we want 6channels and h/w mixing support.
Quoted 12 lines · Mark Brown
Quoted 10 lines · jassi brar
On Sun, Sep 20, 2009 at 1:08 AM, Mark Brown
Quoted 3 lines
I've applied this with a couple of additional fixups below. I've added a dependency on BROKEN since the IISv4 support is not yet present so there's no chance of it working yet.
well, i sent patches for CPU support also. they are simply put on hold until something is decided. if i were given a suggestion atleast i cud try doing that. anyways, the machine driver will almost remain the same in future when we the CPU support is there.
Quoted 4 lines
I think there was enough feedback on the CPU patches? IIRC the main issues were that the driver will need some way to tell that it's an IISv4 block (which it would be able to do with the existing
arch/armbut not with the patches you sent)
Is it a bad idea to use only part, shared with I2S-v3, of I2S-v4 controller when the CPU
driver doesn't yet support other distinguishing features? If yes, then I shud start writing the 6channel and h/w mixing stuff for the CPU driver.
If no, then my patches can be accepted in current or modified form. When 6channel and/or h/w mixing is implemented in the CPU drivers we just enable those features in the controller.
Quoted 3 lines
and that the audio-bus clock has to be
idmplemented so that the driver can probe (or the driver will need to be able to carry on if it can't get the clock).
somehow i missed emailing that patch. will resend with other parts.
Quoted 5 lines
Quoted 2 lines
Btw, I understand as soon as i see a newer for-2.6.xx branch i shud start submitting against that. Right?
For new features, yes. Bug fixes should be done against the version destined for Linus' current tree if the issue applies there.
got it. thanks
Another question ...
The platform device s3c64xx_device_iisv4 is defined in arch/arm/plat-s3c/dev-audio.c
whereas I2S_v4 is available only for S3C6410 and newer SoCs. Shudn't we define it somewhere like arch/arm/plat-s3c64xx/dev-audio.c? I ask because soon I'll be submitting the PCM controller CPU driver for S3C64XX and i wish to define it for s3c64xx specific platform, not the generic s3c. Please suggest.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel