16 May
2011
16 May
'11
11:35 p.m.
On Tue, May 17, 2011 at 01:03:24AM +0400, Dmitry Artamonow wrote:
AK4641 connected via I2S and I2C, jack detection via GPIO.
Signed-off-by: Philipp Zabel philipp.zabel@gmail.com Signed-off-by: Dmitry Artamonow mad_soft@inbox.ru
Same thing here - pretty good but a bit out of date.
- /* Add hx4700 specific widgets */
- snd_soc_dapm_new_controls(dapm, ak4641_dapm_widgets,
ARRAY_SIZE(ak4641_dapm_widgets));
- /* Set up hx4700 specific audio path interconnects */
- snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
- snd_soc_dapm_sync(dapm);
Data based init for these too please.
+static int __init hx4700_init(void) +{
- int ret;
- if (!machine_is_h4700())
return -ENODEV;
- ret = gpio_request(GPIO107_HX4700_SPK_nSD, "SPK_POWER");
- if (ret)
goto err_request_spk;
- ret = gpio_request(GPIO92_HX4700_HP_DRIVER, "EP_POWER");
- if (ret)
goto err_request_ep;
- gpio_direction_output(GPIO107_HX4700_SPK_nSD, 1);
- gpio_direction_output(GPIO92_HX4700_HP_DRIVER, 0);
- hx4700_snd_device = platform_device_alloc("soc-audio", -1);
- if (!hx4700_snd_device) {
Use a regular platform device to register the machine and call snd_soc_register_card() to instantiate please.