[alsa-devel] [PATCH2/5] ASoC S3C24xx machine drivers - Openmoko Neo1973
From: Graeme Gregory gg@opensource.wolfsonmicro.com
This patch adds ALSA support for the Openmoko Neo1973 phone. Features:-
* HiFi Playback and capture. * Phone calls supported. * Support for BT PCM in WM8753 voice interface. * Support for LM4857 audio amp.
Signed-off-by: Graeme Gregory gg@opensource.wolfsonmicro.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 Thu, 10 May 2007 14:00:23 +0100, Liam Girdwood wrote:
+static const char *lm4857_mode[] = {
- "Off",
- "Call Speaker",
- "Stereo Speakers",
- "Stereo Speakers + Headphones",
- "Headphones"
+};
+static const struct soc_enum lm4857_mode_enum[] = {
- SOC_ENUM_SINGLE_EXT(5, lm4857_mode),
ARRAY_SIZE(lm4857_mode) may be better than a number.
+static const char *neo_scenarios[] = {
- "Off",
- "GSM Handset",
- "GSM Headset",
- "GSM Bluetooth",
- "Speakers",
- "Headphones",
- "Capture Handset",
- "Capture Headset",
- "Capture Bluetooth"
+};
+static const struct soc_enum neo_scenario_enum[] = {
- SOC_ENUM_SINGLE_EXT(9,neo_scenarios),
Ditto.
+static int neo1973_wm8753_init(struct snd_soc_codec *codec)
(snip)
- for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) {
if ((err = snd_ctl_add(codec->card,
snd_soc_cnew(&wm8753_neo1973_controls[i],
codec, NULL))) < 0)
Split 'err = ...' and if, please.
return err;
- }
- /* set up neo1973 specific audio path audio_mapnects */
- for(i = 0; audio_map[i][0] != NULL; i++) {
Put a space after for.
+static int lm4857_amp_probe(struct i2c_adapter *adap, int addr, int kind) +{
- int ret;
- client_template.adapter = adap;
- client_template.addr = addr;
- i2c = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
- if (i2c == NULL)
return -ENOMEM;
- memcpy(i2c, &client_template, sizeof(struct i2c_client));
Use can use kmemdup().
thanks,
Takashi
Hi, thanks for your kind comments, here is an updated patch with your comments addressed.
Graeme
Signed-off-by: Graeme Gregory gg@opensource.wolfsonmicro.com Signed-off-by: Liam Girdwood lg@opensource.wolfsonmicro.com
participants (3)
-
Graeme Gregory
-
Liam Girdwood
-
Takashi Iwai