[alsa-devel] [PATCH 1/2] ASoC WM8753 codec support.

This patch series adds support for the WM8753 codec as found on the OpenMoko Neo 1973 (other Neo 1973 and Samsung S3C24xx patches to follow today) as well other new devices.
Features:-
o HiFi and Voice DAI supported (inc runtime switching of DAI mode) o DAPM o All mixers o PLL calculator o 16,20 and 24bit samples. o WM8753 I2C ID added to include/linux/i2c-id.h
Signed-off-by: Harald Welte laforge@openmoko.org Signed-off-by: Graeme Gregory gg@opensource.wolfsonmicro.com Signed-off-by: Seth Forshee seth.forshee@gmail.com Signed-off-by: Liam Girdwood lg@opensource.wolfsonmicro.com
Privacy & Confidentiality Notice ------------------------------------------------- This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. ------------------------------------------------- Wolfson Microelectronics plc Tel: +44 (0)131 272 7000 Fax: +44 (0)131 272 7001 Web: www.wolfsonmicro.com
Registered in Scotland
Company number SC089839
Registered office:
Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK

At Mon, 16 Apr 2007 15:46:05 +0100, Liam Girdwood wrote:
This patch series adds support for the WM8753 codec as found on the OpenMoko Neo 1973 (other Neo 1973 and Samsung S3C24xx patches to follow today) as well other new devices.
Features:-
o HiFi and Voice DAI supported (inc runtime switching of DAI mode) o DAPM o All mixers o PLL calculator o 16,20 and 24bit samples. o WM8753 I2C ID added to include/linux/i2c-id.h
Signed-off-by: Harald Welte laforge@openmoko.org Signed-off-by: Graeme Gregory gg@opensource.wolfsonmicro.com Signed-off-by: Seth Forshee seth.forshee@gmail.com Signed-off-by: Liam Girdwood lg@opensource.wolfsonmicro.com
Am I correct to understand that Harald is the patch author?
+static int caps_charge = 2000; +module_param(caps_charge, int, 0);
Don't want to export to sysfs?
+static const struct soc_enum wm8753_enum[] = { +SOC_ENUM_SINGLE(WM8753_BASS, 7, 2, wm8753_base), // 0
Avoid C++ style comments.
+static void pll_factors(struct _pll_div *pll_div, unsigned int target,
- unsigned int source)
+{
- unsigned long long Kpart;
u64 is better here.
+static int wm8753_set_dai_pll(struct snd_soc_codec_dai *codec_dai,
int pll_id, unsigned int freq_in, unsigned int freq_out)
+{
(snip)
- } else {
u16 value = 0;
struct _pll_div pll_div;
pll_factors(&pll_div, freq_out * 8, freq_in);
/* set up N and K PLL divisor ratios */
/* bits 8:5 = PLL_N, bits 3:0 = PLL_K[21:18] */
value = (pll_div.n << 5) + ((pll_div.k & 0x3c0000) >> 18);
wm8753_write(codec, WM8753_PLL1CTL2 + offset, value);
/* bits 8:0 = PLL_K[17:9] */
value = (pll_div.k & 0x03fe00) >> 9;
wm8753_write(codec, WM8753_PLL1CTL3 + offset, value);
/* bits 8:0 = PLL_K[8:0] */
value = pll_div.k & 0x0001ff;
wm8753_write(codec, WM8753_PLL1CTL4 + offset, value);
/* set PLL as input and enable */
wm8753_write(codec, WM8753_PLL1CTL1 + offset, 0x0027 |
(pll_div.div2 << 3));
wm8753_write(codec, WM8753_CLOCK, reg | enable);
Broken indentations...
Takashi

On Mon, 2007-04-16 at 17:03 +0200, Takashi Iwai wrote:
At Mon, 16 Apr 2007 15:46:05 +0100, Liam Girdwood wrote:
This patch series adds support for the WM8753 codec as found on the OpenMoko Neo 1973 (other Neo 1973 and Samsung S3C24xx patches to follow today) as well other new devices.
Features:-
o HiFi and Voice DAI supported (inc runtime switching of DAI mode) o DAPM o All mixers o PLL calculator o 16,20 and 24bit samples. o WM8753 I2C ID added to include/linux/i2c-id.h
Signed-off-by: Harald Welte laforge@openmoko.org Signed-off-by: Graeme Gregory gg@opensource.wolfsonmicro.com Signed-off-by: Seth Forshee seth.forshee@gmail.com Signed-off-by: Liam Girdwood lg@opensource.wolfsonmicro.com
Am I correct to understand that Harald is the patch author?
No, I'm the main author and have received patches from Harald, Graeme and Seth. Should the ordering be different in this case ?
+static int caps_charge = 2000; +module_param(caps_charge, int, 0);
Don't want to export to sysfs?
We unfortunately can't with this variable as it's used in init to prepare the codec.
All other changes made as requested.
Cheers
Liam
Privacy & Confidentiality Notice ------------------------------------------------- This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. ------------------------------------------------- Wolfson Microelectronics plc Tel: +44 (0)131 272 7000 Fax: +44 (0)131 272 7001 Web: www.wolfsonmicro.com
Registered in Scotland
Company number SC089839
Registered office:
Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK

At Mon, 16 Apr 2007 17:07:24 +0100, Liam Girdwood wrote:
On Mon, 2007-04-16 at 17:03 +0200, Takashi Iwai wrote:
At Mon, 16 Apr 2007 15:46:05 +0100, Liam Girdwood wrote:
This patch series adds support for the WM8753 codec as found on the OpenMoko Neo 1973 (other Neo 1973 and Samsung S3C24xx patches to follow today) as well other new devices.
Features:-
o HiFi and Voice DAI supported (inc runtime switching of DAI mode) o DAPM o All mixers o PLL calculator o 16,20 and 24bit samples. o WM8753 I2C ID added to include/linux/i2c-id.h
Signed-off-by: Harald Welte laforge@openmoko.org Signed-off-by: Graeme Gregory gg@opensource.wolfsonmicro.com Signed-off-by: Seth Forshee seth.forshee@gmail.com Signed-off-by: Liam Girdwood lg@opensource.wolfsonmicro.com
Am I correct to understand that Harald is the patch author?
No, I'm the main author and have received patches from Harald, Graeme and Seth. Should the ordering be different in this case ?
The first peson is usually the author, and others approve the patch. If not, put 'From: xxx' explicitly before Sign-off to indicate the author.
+static int caps_charge = 2000; +module_param(caps_charge, int, 0);
Don't want to export to sysfs?
We unfortunately can't with this variable as it's used in init to prepare the codec.
Yes, but I thought passing 0 prohibits even seeing the value. It's no big issue anyway.
Takashi

At Mon, 16 Apr 2007 18:55:45 +0200, I wrote:
At Mon, 16 Apr 2007 17:07:24 +0100, Liam Girdwood wrote:
On Mon, 2007-04-16 at 17:03 +0200, Takashi Iwai wrote:
At Mon, 16 Apr 2007 15:46:05 +0100, Liam Girdwood wrote:
This patch series adds support for the WM8753 codec as found on the OpenMoko Neo 1973 (other Neo 1973 and Samsung S3C24xx patches to follow today) as well other new devices.
Features:-
o HiFi and Voice DAI supported (inc runtime switching of DAI mode) o DAPM o All mixers o PLL calculator o 16,20 and 24bit samples. o WM8753 I2C ID added to include/linux/i2c-id.h
Signed-off-by: Harald Welte laforge@openmoko.org Signed-off-by: Graeme Gregory gg@opensource.wolfsonmicro.com Signed-off-by: Seth Forshee seth.forshee@gmail.com Signed-off-by: Liam Girdwood lg@opensource.wolfsonmicro.com
Am I correct to understand that Harald is the patch author?
No, I'm the main author and have received patches from Harald, Graeme and Seth. Should the ordering be different in this case ?
The first peson is usually the author, and others approve the patch. If not, put 'From: xxx' explicitly before Sign-off to indicate the author.
+static int caps_charge = 2000; +module_param(caps_charge, int, 0);
Don't want to export to sysfs?
We unfortunately can't with this variable as it's used in init to prepare the codec.
Yes, but I thought passing 0 prohibits even seeing the value. It's no big issue anyway.
Applied now to HG tree.
Thanks,
Takashi
participants (2)
-
Liam Girdwood
-
Takashi Iwai