diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/sh_fsi.h | 12 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 5 | ||||
-rw-r--r-- | include/sound/soc.h | 27 | ||||
-rw-r--r-- | include/sound/sta32x.h | 35 | ||||
-rw-r--r-- | include/sound/wm8903.h | 7 |
5 files changed, 76 insertions, 10 deletions
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h index 9a155f9d0a1..9b1aacaa82f 100644 --- a/include/sound/sh_fsi.h +++ b/include/sound/sh_fsi.h @@ -78,4 +78,16 @@ struct sh_fsi_platform_info { int (*set_rate)(struct device *dev, int is_porta, int rate, int enable); }; +/* + * for fsi-ak4642 + */ +struct fsi_ak4642_info { + const char *name; + const char *card; + const char *cpu_dai; + const char *codec; + const char *platform; + int id; +}; + #endif /* __SOUND_FSI_H */ diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 17a4c17f19f..d26a9b78477 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -43,6 +43,9 @@ .num_kcontrols = 0} /* platform domain */ +#define SND_SOC_DAPM_SIGGEN(wname) \ +{ .id = snd_soc_dapm_siggen, .name = wname, .kcontrol_news = NULL, \ + .num_kcontrols = 0, .reg = SND_SOC_NOPM } #define SND_SOC_DAPM_INPUT(wname) \ { .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \ .num_kcontrols = 0, .reg = SND_SOC_NOPM } @@ -380,6 +383,7 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin); int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, const char *pin); +void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec); /* Mostly internal - should not normally be used */ void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason); @@ -409,6 +413,7 @@ enum snd_soc_dapm_type { snd_soc_dapm_supply, /* power/clock supply */ snd_soc_dapm_aif_in, /* audio interface input */ snd_soc_dapm_aif_out, /* audio interface output */ + snd_soc_dapm_siggen, /* signal generator */ }; /* diff --git a/include/sound/soc.h b/include/sound/soc.h index 11cfb5953e0..0992dff5595 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -231,6 +231,7 @@ enum snd_soc_bias_level { SND_SOC_BIAS_ON = 3, }; +struct device_node; struct snd_jack; struct snd_soc_card; struct snd_soc_pcm_stream; @@ -266,8 +267,6 @@ enum snd_soc_control_type { enum snd_soc_compress_type { SND_SOC_FLAT_COMPRESSION = 1, - SND_SOC_LZO_COMPRESSION, - SND_SOC_RBTREE_COMPRESSION }; enum snd_soc_pcm_subclass { @@ -318,6 +317,7 @@ int snd_soc_platform_read(struct snd_soc_platform *platform, unsigned int reg); int snd_soc_platform_write(struct snd_soc_platform *platform, unsigned int reg, unsigned int val); +int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num); /* Utility functions to get clock rates from various things */ int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); @@ -593,8 +593,7 @@ struct snd_soc_codec_driver { /* driver ops */ int (*probe)(struct snd_soc_codec *); int (*remove)(struct snd_soc_codec *); - int (*suspend)(struct snd_soc_codec *, - pm_message_t state); + int (*suspend)(struct snd_soc_codec *); int (*resume)(struct snd_soc_codec *); /* Default control and setup, added after probe() is run */ @@ -706,8 +705,11 @@ struct snd_soc_dai_link { const char *name; /* Codec name */ const char *stream_name; /* Stream name */ const char *codec_name; /* for multi-codec */ + const struct device_node *codec_of_node; const char *platform_name; /* for multi-platform */ + const struct device_node *platform_of_node; const char *cpu_dai_name; + const struct device_node *cpu_dai_of_node; const char *codec_dai_name; unsigned int dai_fmt; /* format to set on init */ @@ -718,6 +720,9 @@ struct snd_soc_dai_link { /* Symmetry requirements */ unsigned int symmetric_rates:1; + /* pmdown_time is ignored at stop */ + unsigned int ignore_pmdown_time:1; + /* codec/machine specific init - e.g. add machine controls */ int (*init)(struct snd_soc_pcm_runtime *rtd); @@ -813,6 +818,7 @@ struct snd_soc_card { int num_dapm_widgets; const struct snd_soc_dapm_route *dapm_routes; int num_dapm_routes; + bool fully_routed; struct work_struct deferred_resume_work; @@ -840,8 +846,8 @@ struct snd_soc_card { }; /* SoC machine DAI configuration, glues a codec and cpu DAI together */ -struct snd_soc_pcm_runtime { - struct device dev; +struct snd_soc_pcm_runtime { + struct device *dev; struct snd_soc_card *card; struct snd_soc_dai_link *dai_link; struct mutex pcm_mutex; @@ -927,12 +933,12 @@ static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platfo static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, void *data) { - dev_set_drvdata(&rtd->dev, data); + dev_set_drvdata(rtd->dev, data); } static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) { - return dev_get_drvdata(&rtd->dev); + return dev_get_drvdata(rtd->dev); } static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) @@ -960,6 +966,11 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc) int snd_soc_util_init(void); void snd_soc_util_exit(void); +int snd_soc_of_parse_card_name(struct snd_soc_card *card, + const char *propname); +int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, + const char *propname); + #include <sound/soc-dai.h> #ifdef CONFIG_DEBUG_FS diff --git a/include/sound/sta32x.h b/include/sound/sta32x.h new file mode 100644 index 00000000000..8d93b0357a1 --- /dev/null +++ b/include/sound/sta32x.h @@ -0,0 +1,35 @@ +/* + * Platform data for ST STA32x ASoC codec driver. + * + * Copyright: 2011 Raumfeld GmbH + * Author: Johannes Stezenbach <js@sig21.net> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ +#ifndef __LINUX_SND__STA32X_H +#define __LINUX_SND__STA32X_H + +#define STA32X_OCFG_2CH 0 +#define STA32X_OCFG_2_1CH 1 +#define STA32X_OCFG_1CH 3 + +#define STA32X_OM_CH1 0 +#define STA32X_OM_CH2 1 +#define STA32X_OM_CH3 2 + +#define STA32X_THERMAL_ADJUSTMENT_ENABLE 1 +#define STA32X_THERMAL_RECOVERY_ENABLE 2 + +struct sta32x_platform_data { + int output_conf; + int ch1_output_mapping; + int ch2_output_mapping; + int ch3_output_mapping; + int thermal_conf; + int needs_esd_watchdog; +}; + +#endif /* __LINUX_SND__STA32X_H */ diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h index cf7ccb76a8d..b310c5a3a95 100644 --- a/include/sound/wm8903.h +++ b/include/sound/wm8903.h @@ -11,8 +11,11 @@ #ifndef __LINUX_SND_WM8903_H #define __LINUX_SND_WM8903_H -/* Used to enable configuration of a GPIO to all zeros */ -#define WM8903_GPIO_NO_CONFIG 0x8000 +/* + * Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of + * zero in platform data means "don't touch this pin". + */ +#define WM8903_GPIO_CONFIG_ZERO 0x8000 /* * R6 (0x06) - Mic Bias Control 0 |