diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/max9768.h | 24 | ||||
-rw-r--r-- | include/sound/pcm.h | 4 | ||||
-rw-r--r-- | include/sound/sh_fsi.h | 10 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 15 | ||||
-rw-r--r-- | include/sound/soc.h | 10 | ||||
-rw-r--r-- | include/sound/wm2200.h | 41 | ||||
-rw-r--r-- | include/sound/wm8962.h | 6 |
7 files changed, 106 insertions, 4 deletions
diff --git a/include/sound/max9768.h b/include/sound/max9768.h new file mode 100644 index 000000000000..0f78b41d030e --- /dev/null +++ b/include/sound/max9768.h @@ -0,0 +1,24 @@ +/* + * Platform data for MAX9768 + * Copyright (C) 2011, 2012 by Wolfram Sang, Pengutronix e.K. + * same licence as the driver + */ + +#ifndef __SOUND_MAX9768_PDATA_H__ +#define __SOUND_MAX9768_PDATA_H__ + +/** + * struct max9768_pdata - optional platform specific MAX9768 configuration + * @shdn_gpio: GPIO to SHDN pin. If not valid, pin must be hardwired HIGH + * @mute_gpio: GPIO to MUTE pin. If not valid, control for mute won't be added + * @flags: configuration flags, e.g. set classic PWM mode (check datasheet + * regarding "filterless modulation" which is default). + */ +struct max9768_pdata { + int shdn_gpio; + int mute_gpio; + unsigned flags; +#define MAX9768_FLAG_CLASSIC_PWM (1 << 0) +}; + +#endif /* __SOUND_MAX9768_PDATA_H__*/ diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 0cf91b2f08ca..1d58d7957390 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -454,6 +454,7 @@ struct snd_pcm { void *private_data; void (*private_free) (struct snd_pcm *pcm); struct device *dev; /* actual hw device this belongs to */ + bool internal; /* pcm is for internal use only */ #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) struct snd_pcm_oss oss; #endif @@ -475,6 +476,9 @@ extern const struct file_operations snd_pcm_f_ops[2]; int snd_pcm_new(struct snd_card *card, const char *id, int device, int playback_count, int capture_count, struct snd_pcm **rpcm); +int snd_pcm_new_internal(struct snd_card *card, const char *id, int device, + int playback_count, int capture_count, + struct snd_pcm **rpcm); int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count); int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree); diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h index 9b1aacaa82fe..78cd77aff1f4 100644 --- a/include/sound/sh_fsi.h +++ b/include/sound/sh_fsi.h @@ -72,10 +72,14 @@ #define SH_FSI_BPFMD_32 (5 << 4) #define SH_FSI_BPFMD_16 (6 << 4) +struct sh_fsi_port_info { + unsigned long flags; + int (*set_rate)(struct device *dev, int rate, int enable); +}; + struct sh_fsi_platform_info { - unsigned long porta_flags; - unsigned long portb_flags; - int (*set_rate)(struct device *dev, int is_porta, int rate, int enable); + struct sh_fsi_port_info port_a; + struct sh_fsi_port_info port_b; }; /* diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index d26a9b784772..db8435a79a82 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -243,6 +243,10 @@ { .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \ .shift = wshift, .invert = winvert, .event = wevent, \ .event_flags = wflags} +#define SND_SOC_DAPM_REGULATOR_SUPPLY(wname, wdelay) \ +{ .id = snd_soc_dapm_regulator_supply, .name = wname, \ + .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \ + .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD } /* dapm kcontrol types */ #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ @@ -322,6 +326,8 @@ struct snd_soc_dapm_context; int dapm_reg_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event); +int dapm_regulator_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event); /* dapm controls */ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, @@ -365,6 +371,12 @@ int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, const char *stream, int event); void snd_soc_dapm_shutdown(struct snd_soc_card *card); +/* external DAPM widget events */ +int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, + struct snd_kcontrol *kcontrol, int connect); +int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget, + struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e); + /* dapm sys fs - used by the core */ int snd_soc_dapm_sys_add(struct device *dev); void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, @@ -411,6 +423,7 @@ enum snd_soc_dapm_type { snd_soc_dapm_pre, /* machine specific pre widget - exec first */ snd_soc_dapm_post, /* machine specific post widget - exec last */ snd_soc_dapm_supply, /* power/clock supply */ + snd_soc_dapm_regulator_supply, /* external regulator */ snd_soc_dapm_aif_in, /* audio interface input */ snd_soc_dapm_aif_out, /* audio interface output */ snd_soc_dapm_siggen, /* signal generator */ @@ -465,6 +478,8 @@ struct snd_soc_dapm_widget { struct list_head list; struct snd_soc_dapm_context *dapm; + void *priv; /* widget specific data */ + /* dapm control */ short reg; /* negative reg = no direct dapm */ unsigned char shift; /* bits to shift */ diff --git a/include/sound/soc.h b/include/sound/soc.h index 0992dff55959..4f67e01f0e2c 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -368,10 +368,14 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, void *data, char *long_name, const char *prefix); -int snd_soc_add_controls(struct snd_soc_codec *codec, +int snd_soc_add_codec_controls(struct snd_soc_codec *codec, const struct snd_kcontrol_new *controls, int num_controls); int snd_soc_add_platform_controls(struct snd_soc_platform *platform, const struct snd_kcontrol_new *controls, int num_controls); +int snd_soc_add_card_controls(struct snd_soc_card *soc_card, + const struct snd_kcontrol_new *controls, int num_controls); +int snd_soc_add_dai_controls(struct snd_soc_dai *dai, + const struct snd_kcontrol_new *controls, int num_controls); int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, @@ -505,6 +509,7 @@ struct snd_soc_pcm_stream { unsigned int rate_max; /* max rate */ unsigned int channels_min; /* min channels */ unsigned int channels_max; /* max channels */ + unsigned int sig_bits; /* number of bits of content */ }; /* SoC audio ops */ @@ -559,6 +564,7 @@ struct snd_soc_codec { unsigned int ac97_created:1; /* Codec has been created by SoC */ unsigned int sysfs_registered:1; /* codec has been sysfs registered */ unsigned int cache_init:1; /* codec cache has been initialized */ + unsigned int using_regmap:1; /* using regmap access */ u32 cache_only; /* Suppress writes to hardware */ u32 cache_sync; /* Cache needs to be synced to hardware */ @@ -637,6 +643,8 @@ struct snd_soc_codec_driver { /* codec stream completion event */ int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); + bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */ + /* probe ordering - for components with runtime dependencies */ int probe_order; int remove_order; diff --git a/include/sound/wm2200.h b/include/sound/wm2200.h new file mode 100644 index 000000000000..79bf55be7ffa --- /dev/null +++ b/include/sound/wm2200.h @@ -0,0 +1,41 @@ +/* + * linux/sound/wm2200.h -- Platform data for WM2200 + * + * Copyright 2012 Wolfson Microelectronics. PLC. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __LINUX_SND_WM2200_H +#define __LINUX_SND_WM2200_H + +#define WM2200_GPIO_SET 0x10000 + +enum wm2200_in_mode { + WM2200_IN_SE = 0, + WM2200_IN_DIFF = 1, + WM2200_IN_DMIC = 2, +}; + +enum wm2200_dmic_sup { + WM2200_DMIC_SUP_MICVDD = 0, + WM2200_DMIC_SUP_MICBIAS1 = 1, + WM2200_DMIC_SUP_MICBIAS2 = 2, +}; + +struct wm2200_pdata { + int reset; /** GPIO controlling /RESET, if any */ + int ldo_ena; /** GPIO controlling LODENA, if any */ + int irq_flags; + + int gpio_defaults[4]; + + enum wm2200_in_mode in_mode[3]; + enum wm2200_dmic_sup dmic_sup[3]; + + int micbias_cfg[2]; /** Register value to configure MICBIAS */ +}; + +#endif diff --git a/include/sound/wm8962.h b/include/sound/wm8962.h index 1750bed7c2f6..79e6d427b858 100644 --- a/include/sound/wm8962.h +++ b/include/sound/wm8962.h @@ -49,6 +49,12 @@ struct wm8962_pdata { bool irq_active_low; bool spk_mono; /* Speaker outputs tied together as mono */ + + /** + * This flag should be set if one or both IN4 inputs is wired + * in a DC measurement configuration. + */ + bool in4_dc_measure; }; #endif |