Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64bd43a0 authored by Russell King's avatar Russell King Committed by Russell King
Browse files
parents 4a014a24 a48dc30d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -4,12 +4,22 @@
#include <sound/core.h>
#include <sound/pcm.h>

/*
 * @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95)
 *              a -1 value means no gpio will be used for reset

 * reset_gpio should only be specified for pxa27x CPUs where a silicon
 * bug prevents correct operation of the reset line. If not specified,
 * the default behaviour on these CPUs is to consider gpio 113 as the
 * AC97 reset line, which is the default on most boards.
 */
typedef struct {
	int (*startup)(struct snd_pcm_substream *, void *);
	void (*shutdown)(struct snd_pcm_substream *, void *);
	void (*suspend)(void *);
	void (*resume)(void *);
	void *priv;
	int reset_gpio;
} pxa2xx_audio_ops_t;

extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops);
+1 −6
Original line number Diff line number Diff line
#ifndef _INCLUDE_PALMASOC_H_
#define _INCLUDE_PALMASOC_H_

struct palm27x_asoc_info {
	int	jack_gpio;
};

#ifdef CONFIG_SND_PXA2XX_SOC_PALM27X
void __init palm27x_asoc_set_pdata(struct palm27x_asoc_info *data);
#else
static inline void palm27x_asoc_set_pdata(struct palm27x_asoc_info *data) {}
#endif

#endif
+5 −1
Original line number Diff line number Diff line
@@ -742,6 +742,10 @@ struct i2c_pxa_platform_data i2c_pdata = {
	.fast_mode = 1,
};

static pxa2xx_audio_ops_t mioa701_ac97_info = {
	.reset_gpio = 95,
};

/*
 * Mio global
 */
@@ -815,7 +819,7 @@ static void __init mioa701_machine_init(void)
	pxa_set_keypad_info(&mioa701_keypad_info);
	wm97xx_bat_set_pdata(&mioa701_battery_data);
	pxa_set_udc_info(&mioa701_udc_info);
	pxa_set_ac97_info(NULL);
	pxa_set_ac97_info(&mioa701_ac97_info);
	pm_power_off = mioa701_poweroff;
	arm_pm_restart = mioa701_restart;
	platform_add_devices(devices, ARRAY_SIZE(devices));
+15 −3
Original line number Diff line number Diff line
@@ -477,10 +477,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
/******************************************************************************
 * aSoC audio
 ******************************************************************************/
static struct palm27x_asoc_info palm27x_asoc_pdata = {
static struct palm27x_asoc_info palmld_asoc_pdata = {
	.jack_gpio	= GPIO_NR_PALMLD_EARPHONE_DETECT,
};

static pxa2xx_audio_ops_t palmld_ac97_pdata = {
	.reset_gpio	= 95,
};

static struct platform_device palmld_asoc = {
	.name = "palm27x-asoc",
	.id   = -1,
	.dev  = {
		.platform_data = &palmld_asoc_pdata,
	},
};

/******************************************************************************
 * Framebuffer
 ******************************************************************************/
@@ -544,6 +556,7 @@ static struct platform_device *devices[] __initdata = {
	&palmld_backlight,
	&palmld_leds,
	&power_supply,
	&palmld_asoc,
};

static struct map_desc palmld_io_desc[] __initdata = {
@@ -573,11 +586,10 @@ static void __init palmld_init(void)

	set_pxa_fb_info(&palmld_lcd_screen);
	pxa_set_mci_info(&palmld_mci_platform_data);
	pxa_set_ac97_info(NULL);
	pxa_set_ac97_info(&palmld_ac97_pdata);
	pxa_set_ficp_info(&palmld_ficp_platform_data);
	pxa_set_keypad_info(&palmld_keypad_platform_data);
	wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
	palm27x_asoc_set_pdata(&palm27x_asoc_pdata);

	platform_add_devices(devices, ARRAY_SIZE(devices));
}
+15 −3
Original line number Diff line number Diff line
@@ -420,10 +420,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
/******************************************************************************
 * aSoC audio
 ******************************************************************************/
static struct palm27x_asoc_info palm27x_asoc_pdata = {
static struct palm27x_asoc_info palmt5_asoc_pdata = {
	.jack_gpio	= GPIO_NR_PALMT5_EARPHONE_DETECT,
};

static pxa2xx_audio_ops_t palmt5_ac97_pdata = {
	.reset_gpio	= 95,
};

static struct platform_device palmt5_asoc = {
	.name = "palm27x-asoc",
	.id   = -1,
	.dev  = {
		.platform_data = &palmt5_asoc_pdata,
	},
};

/******************************************************************************
 * Framebuffer
 ******************************************************************************/
@@ -486,6 +498,7 @@ static struct platform_device *devices[] __initdata = {
#endif
	&palmt5_backlight,
	&power_supply,
	&palmt5_asoc,
};

/* setup udc GPIOs initial state */
@@ -504,12 +517,11 @@ static void __init palmt5_init(void)
	set_pxa_fb_info(&palmt5_lcd_screen);
	pxa_set_mci_info(&palmt5_mci_platform_data);
	palmt5_udc_init();
	pxa_set_ac97_info(&palmt5_ac97_pdata);
	pxa_set_udc_info(&palmt5_udc_info);
	pxa_set_ac97_info(NULL);
	pxa_set_ficp_info(&palmt5_ficp_platform_data);
	pxa_set_keypad_info(&palmt5_keypad_platform_data);
	wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
	palm27x_asoc_set_pdata(&palm27x_asoc_pdata);
	platform_add_devices(devices, ARRAY_SIZE(devices));
}

Loading