aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/pcm.h35
-rw-r--r--include/sound/pcm_params.h16
-rw-r--r--include/sound/rawmidi.h4
-rw-r--r--include/sound/sb16_csp.h9
-rw-r--r--include/sound/soc-dai.h4
-rw-r--r--include/sound/soc-dapm.h13
-rw-r--r--include/sound/soc.h59
-rw-r--r--include/sound/soundfont.h2
-rw-r--r--include/sound/tea575x-tuner.h8
-rw-r--r--include/sound/tlv320aic3x.h2
-rw-r--r--include/sound/wm8996.h (renamed from include/sound/wm8915.h)28
11 files changed, 140 insertions, 40 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index e1bad1130616..57e71fa33f7c 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -507,6 +507,18 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream);
507void snd_pcm_vma_notify_data(void *client, void *data); 507void snd_pcm_vma_notify_data(void *client, void *data);
508int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); 508int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area);
509 509
510
511#ifdef CONFIG_SND_DEBUG
512void snd_pcm_debug_name(struct snd_pcm_substream *substream,
513 char *name, size_t len);
514#else
515static inline void
516snd_pcm_debug_name(struct snd_pcm_substream *substream, char *buf, size_t size)
517{
518 *buf = 0;
519}
520#endif
521
510/* 522/*
511 * PCM library 523 * PCM library
512 */ 524 */
@@ -749,17 +761,18 @@ static inline const struct snd_interval *hw_param_interval_c(const struct snd_pc
749 return &params->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; 761 return &params->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL];
750} 762}
751 763
752#define params_access(p) ((__force snd_pcm_access_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS))) 764#define params_channels(p) \
753#define params_format(p) ((__force snd_pcm_format_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_FORMAT))) 765 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min)
754#define params_subformat(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) 766#define params_rate(p) \
755#define params_channels(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min 767 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_RATE)->min)
756#define params_rate(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_RATE)->min 768#define params_period_size(p) \
757#define params_period_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min 769 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min)
758#define params_period_bytes(p) ((params_period_size(p)*snd_pcm_format_physical_width(params_format(p))*params_channels(p))/8) 770#define params_periods(p) \
759#define params_periods(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIODS)->min 771 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIODS)->min)
760#define params_buffer_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min 772#define params_buffer_size(p) \
761#define params_buffer_bytes(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min 773 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min)
762 774#define params_buffer_bytes(p) \
775 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min)
763 776
764int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); 777int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v);
765void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); 778void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c);
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h
index 85cf1cf4f31a..f494f1e3c900 100644
--- a/include/sound/pcm_params.h
+++ b/include/sound/pcm_params.h
@@ -337,5 +337,19 @@ static inline unsigned int sub(unsigned int a, unsigned int b)
337 return 0; 337 return 0;
338} 338}
339 339
340#endif /* __SOUND_PCM_PARAMS_H */ 340#define params_access(p) ((__force snd_pcm_access_t)\
341 snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_ACCESS)))
342#define params_format(p) ((__force snd_pcm_format_t)\
343 snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_FORMAT)))
344#define params_subformat(p) \
345 snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_SUBFORMAT))
341 346
347static inline unsigned int
348params_period_bytes(const struct snd_pcm_hw_params *p)
349{
350 return (params_period_size(p) *
351 snd_pcm_format_physical_width(params_format(p)) *
352 params_channels(p)) / 8;
353}
354
355#endif /* __SOUND_PCM_PARAMS_H */
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
index 2480e7d10dcf..6b14359d9fed 100644
--- a/include/sound/rawmidi.h
+++ b/include/sound/rawmidi.h
@@ -27,6 +27,7 @@
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/wait.h> 28#include <linux/wait.h>
29#include <linux/mutex.h> 29#include <linux/mutex.h>
30#include <linux/workqueue.h>
30 31
31#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 32#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
32#include "seq_device.h" 33#include "seq_device.h"
@@ -63,6 +64,7 @@ struct snd_rawmidi_global_ops {
63}; 64};
64 65
65struct snd_rawmidi_runtime { 66struct snd_rawmidi_runtime {
67 struct snd_rawmidi_substream *substream;
66 unsigned int drain: 1, /* drain stage */ 68 unsigned int drain: 1, /* drain stage */
67 oss: 1; /* OSS compatible mode */ 69 oss: 1; /* OSS compatible mode */
68 /* midi stream buffer */ 70 /* midi stream buffer */
@@ -79,7 +81,7 @@ struct snd_rawmidi_runtime {
79 /* event handler (new bytes, input only) */ 81 /* event handler (new bytes, input only) */
80 void (*event)(struct snd_rawmidi_substream *substream); 82 void (*event)(struct snd_rawmidi_substream *substream);
81 /* defers calls to event [input] or ops->trigger [output] */ 83 /* defers calls to event [input] or ops->trigger [output] */
82 struct tasklet_struct tasklet; 84 struct work_struct event_work;
83 /* private data */ 85 /* private data */
84 void *private_data; 86 void *private_data;
85 void (*private_free)(struct snd_rawmidi_substream *substream); 87 void (*private_free)(struct snd_rawmidi_substream *substream);
diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h
index 736eac71d053..af1b49e982df 100644
--- a/include/sound/sb16_csp.h
+++ b/include/sound/sb16_csp.h
@@ -99,7 +99,14 @@ struct snd_sb_csp_info {
99/* get CSP information */ 99/* get CSP information */
100#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) 100#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info)
101/* load microcode to CSP */ 101/* load microcode to CSP */
102#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOW('H', 0x11, struct snd_sb_csp_microcode) 102/* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits)
103 * defined for some architectures like MIPS, and it leads to build errors.
104 * (x86 and co have 14-bit size, thus it's valid, though.)
105 * As a workaround for skipping the size-limit check, here we don't use the
106 * normal _IOW() macro but _IOC() with the manual argument.
107 */
108#define SNDRV_SB_CSP_IOCTL_LOAD_CODE \
109 _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
103/* unload microcode from CSP */ 110/* unload microcode from CSP */
104#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) 111#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
105/* start CSP */ 112/* start CSP */
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 1bafe95dcf41..5ad5f3a50c68 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -209,6 +209,10 @@ struct snd_soc_dai_driver {
209 struct snd_soc_pcm_stream capture; 209 struct snd_soc_pcm_stream capture;
210 struct snd_soc_pcm_stream playback; 210 struct snd_soc_pcm_stream playback;
211 unsigned int symmetric_rates:1; 211 unsigned int symmetric_rates:1;
212
213 /* probe ordering - for components with runtime dependencies */
214 int probe_order;
215 int remove_order;
212}; 216};
213 217
214/* 218/*
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index c46e7d89561d..e0583b7769cb 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -266,6 +266,12 @@
266 .get = snd_soc_dapm_get_enum_virt, \ 266 .get = snd_soc_dapm_get_enum_virt, \
267 .put = snd_soc_dapm_put_enum_virt, \ 267 .put = snd_soc_dapm_put_enum_virt, \
268 .private_value = (unsigned long)&xenum } 268 .private_value = (unsigned long)&xenum }
269#define SOC_DAPM_ENUM_EXT(xname, xenum, xget, xput) \
270{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
271 .info = snd_soc_info_enum_double, \
272 .get = xget, \
273 .put = xput, \
274 .private_value = (unsigned long)&xenum }
269#define SOC_DAPM_VALUE_ENUM(xname, xenum) \ 275#define SOC_DAPM_VALUE_ENUM(xname, xenum) \
270{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 276{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
271 .info = snd_soc_info_enum_double, \ 277 .info = snd_soc_info_enum_double, \
@@ -348,6 +354,8 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm);
348void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm); 354void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm);
349int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, 355int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
350 const struct snd_soc_dapm_route *route, int num); 356 const struct snd_soc_dapm_route *route, int num);
357int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
358 const struct snd_soc_dapm_route *route, int num);
351 359
352/* dapm events */ 360/* dapm events */
353int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, 361int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd,
@@ -429,6 +437,7 @@ struct snd_soc_dapm_path {
429 /* status */ 437 /* status */
430 u32 connect:1; /* source and sink widgets are connected */ 438 u32 connect:1; /* source and sink widgets are connected */
431 u32 walked:1; /* path has been walked */ 439 u32 walked:1; /* path has been walked */
440 u32 weak:1; /* path ignored for power management */
432 441
433 int (*connected)(struct snd_soc_dapm_widget *source, 442 int (*connected)(struct snd_soc_dapm_widget *source,
434 struct snd_soc_dapm_widget *sink); 443 struct snd_soc_dapm_widget *sink);
@@ -444,6 +453,7 @@ struct snd_soc_dapm_widget {
444 char *name; /* widget name */ 453 char *name; /* widget name */
445 char *sname; /* stream name */ 454 char *sname; /* stream name */
446 struct snd_soc_codec *codec; 455 struct snd_soc_codec *codec;
456 struct snd_soc_platform *platform;
447 struct list_head list; 457 struct list_head list;
448 struct snd_soc_dapm_context *dapm; 458 struct snd_soc_dapm_context *dapm;
449 459
@@ -507,10 +517,11 @@ struct snd_soc_dapm_context {
507 517
508 struct device *dev; /* from parent - for debug */ 518 struct device *dev; /* from parent - for debug */
509 struct snd_soc_codec *codec; /* parent codec */ 519 struct snd_soc_codec *codec; /* parent codec */
520 struct snd_soc_platform *platform; /* parent platform */
510 struct snd_soc_card *card; /* parent card */ 521 struct snd_soc_card *card; /* parent card */
511 522
512 /* used during DAPM updates */ 523 /* used during DAPM updates */
513 int dev_power; 524 enum snd_soc_bias_level target_bias_level;
514 struct list_head list; 525 struct list_head list;
515 526
516#ifdef CONFIG_DEBUG_FS 527#ifdef CONFIG_DEBUG_FS
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 3a4bd3a3c68d..aa19f5a32ba8 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -203,6 +203,16 @@
203 SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues) 203 SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
204 204
205/* 205/*
206 * Component probe and remove ordering levels for components with runtime
207 * dependencies.
208 */
209#define SND_SOC_COMP_ORDER_FIRST -2
210#define SND_SOC_COMP_ORDER_EARLY -1
211#define SND_SOC_COMP_ORDER_NORMAL 0
212#define SND_SOC_COMP_ORDER_LATE 1
213#define SND_SOC_COMP_ORDER_LAST 2
214
215/*
206 * Bias levels 216 * Bias levels
207 * 217 *
208 * @ON: Bias is fully on for audio playback and capture operations. 218 * @ON: Bias is fully on for audio playback and capture operations.
@@ -214,10 +224,10 @@
214 * @OFF: Power Off. No restrictions on transition times. 224 * @OFF: Power Off. No restrictions on transition times.
215 */ 225 */
216enum snd_soc_bias_level { 226enum snd_soc_bias_level {
217 SND_SOC_BIAS_OFF, 227 SND_SOC_BIAS_OFF = 0,
218 SND_SOC_BIAS_STANDBY, 228 SND_SOC_BIAS_STANDBY = 1,
219 SND_SOC_BIAS_PREPARE, 229 SND_SOC_BIAS_PREPARE = 2,
220 SND_SOC_BIAS_ON, 230 SND_SOC_BIAS_ON = 3,
221}; 231};
222 232
223struct snd_jack; 233struct snd_jack;
@@ -258,6 +268,11 @@ enum snd_soc_compress_type {
258 SND_SOC_RBTREE_COMPRESSION 268 SND_SOC_RBTREE_COMPRESSION
259}; 269};
260 270
271enum snd_soc_pcm_subclass {
272 SND_SOC_PCM_CLASS_PCM = 0,
273 SND_SOC_PCM_CLASS_BE = 1,
274};
275
261int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id, 276int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
262 unsigned int freq, int dir); 277 unsigned int freq, int dir);
263int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, 278int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
@@ -297,6 +312,10 @@ int snd_soc_default_readable_register(struct snd_soc_codec *codec,
297 unsigned int reg); 312 unsigned int reg);
298int snd_soc_default_writable_register(struct snd_soc_codec *codec, 313int snd_soc_default_writable_register(struct snd_soc_codec *codec,
299 unsigned int reg); 314 unsigned int reg);
315int snd_soc_platform_read(struct snd_soc_platform *platform,
316 unsigned int reg);
317int snd_soc_platform_write(struct snd_soc_platform *platform,
318 unsigned int reg, unsigned int val);
300 319
301/* Utility functions to get clock rates from various things */ 320/* Utility functions to get clock rates from various things */
302int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); 321int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
@@ -349,6 +368,8 @@ struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
349 const char *prefix); 368 const char *prefix);
350int snd_soc_add_controls(struct snd_soc_codec *codec, 369int snd_soc_add_controls(struct snd_soc_codec *codec,
351 const struct snd_kcontrol_new *controls, int num_controls); 370 const struct snd_kcontrol_new *controls, int num_controls);
371int snd_soc_add_platform_controls(struct snd_soc_platform *platform,
372 const struct snd_kcontrol_new *controls, int num_controls);
352int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, 373int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol,
353 struct snd_ctl_elem_info *uinfo); 374 struct snd_ctl_elem_info *uinfo);
354int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, 375int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol,
@@ -612,6 +633,10 @@ struct snd_soc_codec_driver {
612 633
613 void (*seq_notifier)(struct snd_soc_dapm_context *, 634 void (*seq_notifier)(struct snd_soc_dapm_context *,
614 enum snd_soc_dapm_type, int); 635 enum snd_soc_dapm_type, int);
636
637 /* probe ordering - for components with runtime dependencies */
638 int probe_order;
639 int remove_order;
615}; 640};
616 641
617/* SoC platform interface */ 642/* SoC platform interface */
@@ -623,10 +648,17 @@ struct snd_soc_platform_driver {
623 int (*resume)(struct snd_soc_dai *dai); 648 int (*resume)(struct snd_soc_dai *dai);
624 649
625 /* pcm creation and destruction */ 650 /* pcm creation and destruction */
626 int (*pcm_new)(struct snd_card *, struct snd_soc_dai *, 651 int (*pcm_new)(struct snd_soc_pcm_runtime *);
627 struct snd_pcm *);
628 void (*pcm_free)(struct snd_pcm *); 652 void (*pcm_free)(struct snd_pcm *);
629 653
654 /* Default control and setup, added after probe() is run */
655 const struct snd_kcontrol_new *controls;
656 int num_controls;
657 const struct snd_soc_dapm_widget *dapm_widgets;
658 int num_dapm_widgets;
659 const struct snd_soc_dapm_route *dapm_routes;
660 int num_dapm_routes;
661
630 /* 662 /*
631 * For platform caused delay reporting. 663 * For platform caused delay reporting.
632 * Optional. 664 * Optional.
@@ -636,6 +668,14 @@ struct snd_soc_platform_driver {
636 668
637 /* platform stream ops */ 669 /* platform stream ops */
638 struct snd_pcm_ops *ops; 670 struct snd_pcm_ops *ops;
671
672 /* probe ordering - for components with runtime dependencies */
673 int probe_order;
674 int remove_order;
675
676 /* platform IO - used for platform DAPM */
677 unsigned int (*read)(struct snd_soc_platform *, unsigned int);
678 int (*write)(struct snd_soc_platform *, unsigned int, unsigned int);
639}; 679};
640 680
641struct snd_soc_platform { 681struct snd_soc_platform {
@@ -650,6 +690,8 @@ struct snd_soc_platform {
650 struct snd_soc_card *card; 690 struct snd_soc_card *card;
651 struct list_head list; 691 struct list_head list;
652 struct list_head card_list; 692 struct list_head card_list;
693
694 struct snd_soc_dapm_context dapm;
653}; 695};
654 696
655struct snd_soc_dai_link { 697struct snd_soc_dai_link {
@@ -725,8 +767,10 @@ struct snd_soc_card {
725 767
726 /* callbacks */ 768 /* callbacks */
727 int (*set_bias_level)(struct snd_soc_card *, 769 int (*set_bias_level)(struct snd_soc_card *,
770 struct snd_soc_dapm_context *dapm,
728 enum snd_soc_bias_level level); 771 enum snd_soc_bias_level level);
729 int (*set_bias_level_post)(struct snd_soc_card *, 772 int (*set_bias_level_post)(struct snd_soc_card *,
773 struct snd_soc_dapm_context *dapm,
730 enum snd_soc_bias_level level); 774 enum snd_soc_bias_level level);
731 775
732 long pmdown_time; 776 long pmdown_time;
@@ -789,6 +833,9 @@ struct snd_soc_pcm_runtime {
789 struct device dev; 833 struct device dev;
790 struct snd_soc_card *card; 834 struct snd_soc_card *card;
791 struct snd_soc_dai_link *dai_link; 835 struct snd_soc_dai_link *dai_link;
836 struct mutex pcm_mutex;
837 enum snd_soc_pcm_subclass pcm_subclass;
838 struct snd_pcm_ops ops;
792 839
793 unsigned int complete:1; 840 unsigned int complete:1;
794 unsigned int dev_registered:1; 841 unsigned int dev_registered:1;
diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h
index f95d99ba7f74..679df0574066 100644
--- a/include/sound/soundfont.h
+++ b/include/sound/soundfont.h
@@ -121,7 +121,7 @@ int snd_soundfont_search_zone(struct snd_sf_list *sflist, int *notep, int vel,
121int snd_sf_calc_parm_hold(int msec); 121int snd_sf_calc_parm_hold(int msec);
122int snd_sf_calc_parm_attack(int msec); 122int snd_sf_calc_parm_attack(int msec);
123int snd_sf_calc_parm_decay(int msec); 123int snd_sf_calc_parm_decay(int msec);
124#define snd_sf_calc_parm_delay(msec) (0x8000 - (msec) * 1000 / 725); 124#define snd_sf_calc_parm_delay(msec) (0x8000 - (msec) * 1000 / 725)
125extern int snd_sf_vol_table[128]; 125extern int snd_sf_vol_table[128];
126int snd_sf_linear_to_log(unsigned int amount, int offset, int ratio); 126int snd_sf_linear_to_log(unsigned int amount, int offset, int ratio);
127 127
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h
index d2ea112fc20f..726e94742a5c 100644
--- a/include/sound/tea575x-tuner.h
+++ b/include/sound/tea575x-tuner.h
@@ -23,8 +23,8 @@
23 */ 23 */
24 24
25#include <linux/videodev2.h> 25#include <linux/videodev2.h>
26#include <media/v4l2-ctrls.h>
26#include <media/v4l2-dev.h> 27#include <media/v4l2-dev.h>
27#include <media/v4l2-ioctl.h>
28 28
29#define TEA575X_FMIF 10700 29#define TEA575X_FMIF 10700
30 30
@@ -42,18 +42,20 @@ struct snd_tea575x_ops {
42}; 42};
43 43
44struct snd_tea575x { 44struct snd_tea575x {
45 struct video_device *vd; /* video device */ 45 struct video_device vd; /* video device */
46 bool tea5759; /* 5759 chip is present */ 46 bool tea5759; /* 5759 chip is present */
47 bool mute; /* Device is muted? */ 47 bool mute; /* Device is muted? */
48 bool stereo; /* receiving stereo */ 48 bool stereo; /* receiving stereo */
49 bool tuned; /* tuned to a station */ 49 bool tuned; /* tuned to a station */
50 unsigned int val; /* hw value */ 50 unsigned int val; /* hw value */
51 unsigned long freq; /* frequency */ 51 unsigned long freq; /* frequency */
52 unsigned long in_use; /* set if the device is in use */ 52 struct mutex mutex;
53 struct snd_tea575x_ops *ops; 53 struct snd_tea575x_ops *ops;
54 void *private_data; 54 void *private_data;
55 u8 card[32]; 55 u8 card[32];
56 u8 bus_info[32]; 56 u8 bus_info[32];
57 struct v4l2_ctrl_handler ctrl_handler;
58 int (*ext_init)(struct snd_tea575x *tea);
57}; 59};
58 60
59int snd_tea575x_init(struct snd_tea575x *tea); 61int snd_tea575x_init(struct snd_tea575x *tea);
diff --git a/include/sound/tlv320aic3x.h b/include/sound/tlv320aic3x.h
index 99e0308bf2c2..ffd9bc793105 100644
--- a/include/sound/tlv320aic3x.h
+++ b/include/sound/tlv320aic3x.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Platform data for Texas Instruments TLV320AIC3x codec 2 * Platform data for Texas Instruments TLV320AIC3x codec
3 * 3 *
4 * Author: Jarkko Nikula <jhnikula@gmail.com> 4 * Author: Jarkko Nikula <jarkko.nikula@bitmer.com>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
diff --git a/include/sound/wm8915.h b/include/sound/wm8996.h
index 5817d762f6f3..ea4d88f43975 100644
--- a/include/sound/wm8915.h
+++ b/include/sound/wm8996.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/sound/wm8915.h -- Platform data for WM8915 2 * linux/sound/wm8996.h -- Platform data for WM8996
3 * 3 *
4 * Copyright 2011 Wolfson Microelectronics. PLC. 4 * Copyright 2011 Wolfson Microelectronics. PLC.
5 * 5 *
@@ -8,14 +8,14 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#ifndef __LINUX_SND_WM8903_H 11#ifndef __LINUX_SND_WM8996_H
12#define __LINUX_SND_WM8903_H 12#define __LINUX_SND_WM8996_H
13 13
14enum wm8915_inmode { 14enum wm8996_inmode {
15 WM8915_DIFFERRENTIAL_1 = 0, /* IN1xP - IN1xN */ 15 WM8996_DIFFERRENTIAL_1 = 0, /* IN1xP - IN1xN */
16 WM8915_INVERTING = 1, /* IN1xN */ 16 WM8996_INVERTING = 1, /* IN1xN */
17 WM8915_NON_INVERTING = 2, /* IN1xP */ 17 WM8996_NON_INVERTING = 2, /* IN1xP */
18 WM8915_DIFFERENTIAL_2 = 3, /* IN2xP - IN2xP */ 18 WM8996_DIFFERENTIAL_2 = 3, /* IN2xP - IN2xP */
19}; 19};
20 20
21/** 21/**
@@ -25,23 +25,23 @@ enum wm8915_inmode {
25 * Configurations are expected to be generated using the ReTune Mobile 25 * Configurations are expected to be generated using the ReTune Mobile
26 * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/ 26 * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/
27 */ 27 */
28struct wm8915_retune_mobile_config { 28struct wm8996_retune_mobile_config {
29 const char *name; 29 const char *name;
30 int rate; 30 int rate;
31 u16 regs[20]; 31 u16 regs[20];
32}; 32};
33 33
34#define WM8915_SET_DEFAULT 0x10000 34#define WM8996_SET_DEFAULT 0x10000
35 35
36struct wm8915_pdata { 36struct wm8996_pdata {
37 int irq_flags; /** Set IRQ trigger flags; default active low */ 37 int irq_flags; /** Set IRQ trigger flags; default active low */
38 38
39 int ldo_ena; /** GPIO for LDO1; -1 for none */ 39 int ldo_ena; /** GPIO for LDO1; -1 for none */
40 40
41 int micdet_def; /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */ 41 int micdet_def; /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */
42 42
43 enum wm8915_inmode inl_mode; 43 enum wm8996_inmode inl_mode;
44 enum wm8915_inmode inr_mode; 44 enum wm8996_inmode inr_mode;
45 45
46 u32 spkmute_seq; /** Value for register 0x802 */ 46 u32 spkmute_seq; /** Value for register 0x802 */
47 47
@@ -49,7 +49,7 @@ struct wm8915_pdata {
49 u32 gpio_default[5]; 49 u32 gpio_default[5];
50 50
51 int num_retune_mobile_cfgs; 51 int num_retune_mobile_cfgs;
52 struct wm8915_retune_mobile_config *retune_mobile_cfgs; 52 struct wm8996_retune_mobile_config *retune_mobile_cfgs;
53}; 53};
54 54
55#endif 55#endif