diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 14:41:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 14:41:32 -0500 |
commit | cb10ea549fdc0ab2dd8988adab5bf40b4fa642f3 (patch) | |
tree | 6bc11e0af9f0639a5eedd055401086c8c771f21e /include | |
parent | 81d6e59dabb1ae0c782e9eb7e3d88f699d25b314 (diff) | |
parent | 5ce442fe2c9423ec5451222aee6f9b2127bb8311 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (367 commits)
ALSA: ASoC: fix a typo in omp-pcm.c
ASoC: Fix DSP formats in SSM2602 audio codec
ASoC: Fix incorrect DSP format in OMAP McBSP DAI and affected drivers
ALSA: hda: fix incorrect mixer index values for 92hd83xx
ALSA: hda: dinput_mux check
ALSA: hda - Add quirk for another HP dv7
ALSA: ASoC - Add missing __devexit annotation to wm8350.c
ALSA: ASoc: DaVinci: davinci-evm use dsp_b mode
ALSA: ASoC: DaVinci: i2s, evm, pass same value to codec and cpu_dai
ALSA: ASoC: tlv320aic3x add dsp_a
ALSA: ASoC: DaVinci: document I2S limitations
ALSA: ASoC: DaVinci: davinci-i2s clean up
ALSA: ASoC: DaVinci: davinci-i2s clean up
ALSA: ASoC: DaVinci: davinci-i2s add comments to explain polarity
ALSA: ASoC: DaVinci: davinvi-evm, make requests explicit
ALSA: ca0106 - disable 44.1kHz capture
ALSA: ca0106 - Add missing card->private_data initialization
ALSA: ca0106 - Check ac97 availability at PM
ALSA: hda - Power up always when no jack detection is available
ALSA: hda - Fix unused variable warnings in patch_sigmatel.c
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/input.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/audio.h | 38 | ||||
-rw-r--r-- | include/sound/ac97_codec.h | 2 | ||||
-rw-r--r-- | include/sound/asound.h | 1 | ||||
-rw-r--r-- | include/sound/core.h | 28 | ||||
-rw-r--r-- | include/sound/info.h | 106 | ||||
-rw-r--r-- | include/sound/jack.h | 2 | ||||
-rw-r--r-- | include/sound/l3.h | 18 | ||||
-rw-r--r-- | include/sound/s3c24xx_uda134x.h | 14 | ||||
-rw-r--r-- | include/sound/soc-dai.h | 231 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 2 | ||||
-rw-r--r-- | include/sound/soc.h | 206 | ||||
-rw-r--r-- | include/sound/uda134x.h | 26 | ||||
-rw-r--r-- | include/sound/version.h | 2 |
14 files changed, 449 insertions, 229 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index 5341e8251f8c..9a6355f74db2 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -659,6 +659,8 @@ struct input_absinfo { | |||
659 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | 659 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ |
660 | #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ | 660 | #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ |
661 | #define SW_DOCK 0x05 /* set = plugged into dock */ | 661 | #define SW_DOCK 0x05 /* set = plugged into dock */ |
662 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ | ||
663 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ | ||
662 | #define SW_MAX 0x0f | 664 | #define SW_MAX 0x0f |
663 | #define SW_CNT (SW_MAX+1) | 665 | #define SW_CNT (SW_MAX+1) |
664 | 666 | ||
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index 217bb22ebb8e..af95a1d2f3a1 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * audio.h -- Audio Driver for Wolfson WM8350 PMIC | 2 | * audio.h -- Audio Driver for Wolfson WM8350 PMIC |
3 | * | 3 | * |
4 | * Copyright 2007 Wolfson Microelectronics PLC | 4 | * Copyright 2007, 2008 Wolfson Microelectronics PLC |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -70,9 +70,9 @@ | |||
70 | #define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */ | 70 | #define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */ |
71 | 71 | ||
72 | #define WM8350_VMID_OFF 0 | 72 | #define WM8350_VMID_OFF 0 |
73 | #define WM8350_VMID_500K 1 | 73 | #define WM8350_VMID_300K 1 |
74 | #define WM8350_VMID_100K 2 | 74 | #define WM8350_VMID_50K 2 |
75 | #define WM8350_VMID_10K 3 | 75 | #define WM8350_VMID_5K 3 |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * R40 (0x28) - Clock Control 1 | 78 | * R40 (0x28) - Clock Control 1 |
@@ -591,8 +591,38 @@ | |||
591 | #define WM8350_IRQ_CODEC_MICSCD 41 | 591 | #define WM8350_IRQ_CODEC_MICSCD 41 |
592 | #define WM8350_IRQ_CODEC_MICD 42 | 592 | #define WM8350_IRQ_CODEC_MICD 42 |
593 | 593 | ||
594 | /* | ||
595 | * WM8350 Platform data. | ||
596 | * | ||
597 | * This must be initialised per platform for best audio performance. | ||
598 | * Please see WM8350 datasheet for information. | ||
599 | */ | ||
600 | struct wm8350_audio_platform_data { | ||
601 | int vmid_discharge_msecs; /* VMID --> OFF discharge time */ | ||
602 | int drain_msecs; /* OFF drain time */ | ||
603 | int cap_discharge_msecs; /* Cap ON (from OFF) discharge time */ | ||
604 | int vmid_charge_msecs; /* vmid power up time */ | ||
605 | u32 vmid_s_curve:2; /* vmid enable s curve speed */ | ||
606 | u32 dis_out4:2; /* out4 discharge speed */ | ||
607 | u32 dis_out3:2; /* out3 discharge speed */ | ||
608 | u32 dis_out2:2; /* out2 discharge speed */ | ||
609 | u32 dis_out1:2; /* out1 discharge speed */ | ||
610 | u32 vroi_out4:1; /* out4 tie off */ | ||
611 | u32 vroi_out3:1; /* out3 tie off */ | ||
612 | u32 vroi_out2:1; /* out2 tie off */ | ||
613 | u32 vroi_out1:1; /* out1 tie off */ | ||
614 | u32 vroi_enable:1; /* enable tie off */ | ||
615 | u32 codec_current_on:2; /* current level ON */ | ||
616 | u32 codec_current_standby:2; /* current level STANDBY */ | ||
617 | u32 codec_current_charge:2; /* codec current @ vmid charge */ | ||
618 | }; | ||
619 | |||
620 | struct snd_soc_codec; | ||
621 | |||
594 | struct wm8350_codec { | 622 | struct wm8350_codec { |
595 | struct platform_device *pdev; | 623 | struct platform_device *pdev; |
624 | struct snd_soc_codec *codec; | ||
625 | struct wm8350_audio_platform_data *platform_data; | ||
596 | }; | 626 | }; |
597 | 627 | ||
598 | #endif | 628 | #endif |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 9c309daf492b..251fc1cd5002 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -281,10 +281,12 @@ | |||
281 | /* specific - Analog Devices */ | 281 | /* specific - Analog Devices */ |
282 | #define AC97_AD_TEST 0x5a /* test register */ | 282 | #define AC97_AD_TEST 0x5a /* test register */ |
283 | #define AC97_AD_TEST2 0x5c /* undocumented test register 2 */ | 283 | #define AC97_AD_TEST2 0x5c /* undocumented test register 2 */ |
284 | #define AC97_AD_HPFD_SHIFT 12 /* High Pass Filter Disable */ | ||
284 | #define AC97_AD_CODEC_CFG 0x70 /* codec configuration */ | 285 | #define AC97_AD_CODEC_CFG 0x70 /* codec configuration */ |
285 | #define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */ | 286 | #define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */ |
286 | #define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */ | 287 | #define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */ |
287 | #define AC97_AD_MISC 0x76 /* Misc Control Bits */ | 288 | #define AC97_AD_MISC 0x76 /* Misc Control Bits */ |
289 | #define AC97_AD_VREFD_SHIFT 2 /* V_REFOUT Disable (AD1888) */ | ||
288 | 290 | ||
289 | /* specific - Cirrus Logic */ | 291 | /* specific - Cirrus Logic */ |
290 | #define AC97_CSR_ACMODE 0x5e /* AC Mode Register */ | 292 | #define AC97_CSR_ACMODE 0x5e /* AC Mode Register */ |
diff --git a/include/sound/asound.h b/include/sound/asound.h index 2c4dc908a54a..1c02ed1d7c4a 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -575,6 +575,7 @@ enum { | |||
575 | #define SNDRV_TIMER_GLOBAL_SYSTEM 0 | 575 | #define SNDRV_TIMER_GLOBAL_SYSTEM 0 |
576 | #define SNDRV_TIMER_GLOBAL_RTC 1 | 576 | #define SNDRV_TIMER_GLOBAL_RTC 1 |
577 | #define SNDRV_TIMER_GLOBAL_HPET 2 | 577 | #define SNDRV_TIMER_GLOBAL_HPET 2 |
578 | #define SNDRV_TIMER_GLOBAL_HRTIMER 3 | ||
578 | 579 | ||
579 | /* info flags */ | 580 | /* info flags */ |
580 | #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ | 581 | #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ |
diff --git a/include/sound/core.h b/include/sound/core.h index 1508c4ec1ba9..f632484bc743 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -353,7 +353,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
353 | * snd_printk - printk wrapper | 353 | * snd_printk - printk wrapper |
354 | * @fmt: format string | 354 | * @fmt: format string |
355 | * | 355 | * |
356 | * Works like print() but prints the file and the line of the caller | 356 | * Works like printk() but prints the file and the line of the caller |
357 | * when configured with CONFIG_SND_VERBOSE_PRINTK. | 357 | * when configured with CONFIG_SND_VERBOSE_PRINTK. |
358 | */ | 358 | */ |
359 | #define snd_printk(fmt, args...) \ | 359 | #define snd_printk(fmt, args...) \ |
@@ -380,18 +380,40 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
380 | printk(fmt ,##args) | 380 | printk(fmt ,##args) |
381 | #endif | 381 | #endif |
382 | 382 | ||
383 | /** | ||
384 | * snd_BUG - give a BUG warning message and stack trace | ||
385 | * | ||
386 | * Calls WARN() if CONFIG_SND_DEBUG is set. | ||
387 | * Ignored when CONFIG_SND_DEBUG is not set. | ||
388 | */ | ||
383 | #define snd_BUG() WARN(1, "BUG?\n") | 389 | #define snd_BUG() WARN(1, "BUG?\n") |
390 | |||
391 | /** | ||
392 | * snd_BUG_ON - debugging check macro | ||
393 | * @cond: condition to evaluate | ||
394 | * | ||
395 | * When CONFIG_SND_DEBUG is set, this macro evaluates the given condition, | ||
396 | * and call WARN() and returns the value if it's non-zero. | ||
397 | * | ||
398 | * When CONFIG_SND_DEBUG is not set, this just returns zero, and the given | ||
399 | * condition is ignored. | ||
400 | * | ||
401 | * NOTE: the argument won't be evaluated at all when CONFIG_SND_DEBUG=n. | ||
402 | * Thus, don't put any statement that influences on the code behavior, | ||
403 | * such as pre/post increment, to the argument of this macro. | ||
404 | * If you want to evaluate and give a warning, use standard WARN_ON(). | ||
405 | */ | ||
384 | #define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) | 406 | #define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) |
385 | 407 | ||
386 | #else /* !CONFIG_SND_DEBUG */ | 408 | #else /* !CONFIG_SND_DEBUG */ |
387 | 409 | ||
388 | #define snd_printd(fmt, args...) do { } while (0) | 410 | #define snd_printd(fmt, args...) do { } while (0) |
389 | #define snd_BUG() do { } while (0) | 411 | #define snd_BUG() do { } while (0) |
390 | static inline int __snd_bug_on(void) | 412 | static inline int __snd_bug_on(int cond) |
391 | { | 413 | { |
392 | return 0; | 414 | return 0; |
393 | } | 415 | } |
394 | #define snd_BUG_ON(cond) __snd_bug_on() /* always false */ | 416 | #define snd_BUG_ON(cond) __snd_bug_on(0 && (cond)) /* always false */ |
395 | 417 | ||
396 | #endif /* CONFIG_SND_DEBUG */ | 418 | #endif /* CONFIG_SND_DEBUG */ |
397 | 419 | ||
diff --git a/include/sound/info.h b/include/sound/info.h index 8ae72e74f898..7c2ee1a21b00 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
@@ -40,30 +40,34 @@ struct snd_info_buffer { | |||
40 | struct snd_info_entry; | 40 | struct snd_info_entry; |
41 | 41 | ||
42 | struct snd_info_entry_text { | 42 | struct snd_info_entry_text { |
43 | void (*read) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); | 43 | void (*read)(struct snd_info_entry *entry, |
44 | void (*write) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); | 44 | struct snd_info_buffer *buffer); |
45 | void (*write)(struct snd_info_entry *entry, | ||
46 | struct snd_info_buffer *buffer); | ||
45 | }; | 47 | }; |
46 | 48 | ||
47 | struct snd_info_entry_ops { | 49 | struct snd_info_entry_ops { |
48 | int (*open) (struct snd_info_entry *entry, | 50 | int (*open)(struct snd_info_entry *entry, |
49 | unsigned short mode, void **file_private_data); | 51 | unsigned short mode, void **file_private_data); |
50 | int (*release) (struct snd_info_entry * entry, | 52 | int (*release)(struct snd_info_entry *entry, |
51 | unsigned short mode, void *file_private_data); | 53 | unsigned short mode, void *file_private_data); |
52 | long (*read) (struct snd_info_entry *entry, void *file_private_data, | 54 | long (*read)(struct snd_info_entry *entry, void *file_private_data, |
53 | struct file * file, char __user *buf, | 55 | struct file *file, char __user *buf, |
56 | unsigned long count, unsigned long pos); | ||
57 | long (*write)(struct snd_info_entry *entry, void *file_private_data, | ||
58 | struct file *file, const char __user *buf, | ||
54 | unsigned long count, unsigned long pos); | 59 | unsigned long count, unsigned long pos); |
55 | long (*write) (struct snd_info_entry *entry, void *file_private_data, | 60 | long long (*llseek)(struct snd_info_entry *entry, |
56 | struct file * file, const char __user *buf, | 61 | void *file_private_data, struct file *file, |
57 | unsigned long count, unsigned long pos); | 62 | long long offset, int orig); |
58 | long long (*llseek) (struct snd_info_entry *entry, void *file_private_data, | 63 | unsigned int(*poll)(struct snd_info_entry *entry, |
59 | struct file * file, long long offset, int orig); | 64 | void *file_private_data, struct file *file, |
60 | unsigned int (*poll) (struct snd_info_entry *entry, void *file_private_data, | 65 | poll_table *wait); |
61 | struct file * file, poll_table * wait); | 66 | int (*ioctl)(struct snd_info_entry *entry, void *file_private_data, |
62 | int (*ioctl) (struct snd_info_entry *entry, void *file_private_data, | 67 | struct file *file, unsigned int cmd, unsigned long arg); |
63 | struct file * file, unsigned int cmd, unsigned long arg); | 68 | int (*mmap)(struct snd_info_entry *entry, void *file_private_data, |
64 | int (*mmap) (struct snd_info_entry *entry, void *file_private_data, | 69 | struct inode *inode, struct file *file, |
65 | struct inode * inode, struct file * file, | 70 | struct vm_area_struct *vma); |
66 | struct vm_area_struct * vma); | ||
67 | }; | 71 | }; |
68 | 72 | ||
69 | struct snd_info_entry { | 73 | struct snd_info_entry { |
@@ -106,34 +110,37 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer); | |||
106 | static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} | 110 | static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} |
107 | #endif | 111 | #endif |
108 | 112 | ||
109 | int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) __attribute__ ((format (printf, 2, 3))); | 113 | int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) \ |
114 | __attribute__ ((format (printf, 2, 3))); | ||
110 | int snd_info_init(void); | 115 | int snd_info_init(void); |
111 | int snd_info_done(void); | 116 | int snd_info_done(void); |
112 | 117 | ||
113 | int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len); | 118 | int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len); |
114 | char *snd_info_get_str(char *dest, char *src, int len); | 119 | char *snd_info_get_str(char *dest, char *src, int len); |
115 | struct snd_info_entry *snd_info_create_module_entry(struct module * module, | 120 | struct snd_info_entry *snd_info_create_module_entry(struct module *module, |
116 | const char *name, | 121 | const char *name, |
117 | struct snd_info_entry * parent); | 122 | struct snd_info_entry *parent); |
118 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, | 123 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, |
119 | const char *name, | 124 | const char *name, |
120 | struct snd_info_entry * parent); | 125 | struct snd_info_entry *parent); |
121 | void snd_info_free_entry(struct snd_info_entry * entry); | 126 | void snd_info_free_entry(struct snd_info_entry *entry); |
122 | int snd_info_store_text(struct snd_info_entry * entry); | 127 | int snd_info_store_text(struct snd_info_entry *entry); |
123 | int snd_info_restore_text(struct snd_info_entry * entry); | 128 | int snd_info_restore_text(struct snd_info_entry *entry); |
124 | 129 | ||
125 | int snd_info_card_create(struct snd_card * card); | 130 | int snd_info_card_create(struct snd_card *card); |
126 | int snd_info_card_register(struct snd_card * card); | 131 | int snd_info_card_register(struct snd_card *card); |
127 | int snd_info_card_free(struct snd_card * card); | 132 | int snd_info_card_free(struct snd_card *card); |
128 | void snd_info_card_disconnect(struct snd_card * card); | 133 | void snd_info_card_disconnect(struct snd_card *card); |
129 | int snd_info_register(struct snd_info_entry * entry); | 134 | void snd_info_card_id_change(struct snd_card *card); |
135 | int snd_info_register(struct snd_info_entry *entry); | ||
130 | 136 | ||
131 | /* for card drivers */ | 137 | /* for card drivers */ |
132 | int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp); | 138 | int snd_card_proc_new(struct snd_card *card, const char *name, |
139 | struct snd_info_entry **entryp); | ||
133 | 140 | ||
134 | static inline void snd_info_set_text_ops(struct snd_info_entry *entry, | 141 | static inline void snd_info_set_text_ops(struct snd_info_entry *entry, |
135 | void *private_data, | 142 | void *private_data, |
136 | void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) | 143 | void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) |
137 | { | 144 | { |
138 | entry->private_data = private_data; | 145 | entry->private_data = private_data; |
139 | entry->c.text.read = read; | 146 | entry->c.text.read = read; |
@@ -146,21 +153,22 @@ int snd_info_check_reserved_words(const char *str); | |||
146 | #define snd_seq_root NULL | 153 | #define snd_seq_root NULL |
147 | #define snd_oss_root NULL | 154 | #define snd_oss_root NULL |
148 | 155 | ||
149 | static inline int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) { return 0; } | 156 | static inline int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) { return 0; } |
150 | static inline int snd_info_init(void) { return 0; } | 157 | static inline int snd_info_init(void) { return 0; } |
151 | static inline int snd_info_done(void) { return 0; } | 158 | static inline int snd_info_done(void) { return 0; } |
152 | 159 | ||
153 | static inline int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len) { return 0; } | 160 | static inline int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) { return 0; } |
154 | static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; } | 161 | static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; } |
155 | static inline struct snd_info_entry *snd_info_create_module_entry(struct module * module, const char *name, struct snd_info_entry * parent) { return NULL; } | 162 | static inline struct snd_info_entry *snd_info_create_module_entry(struct module *module, const char *name, struct snd_info_entry *parent) { return NULL; } |
156 | static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, const char *name, struct snd_info_entry * parent) { return NULL; } | 163 | static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, const char *name, struct snd_info_entry *parent) { return NULL; } |
157 | static inline void snd_info_free_entry(struct snd_info_entry * entry) { ; } | 164 | static inline void snd_info_free_entry(struct snd_info_entry *entry) { ; } |
158 | 165 | ||
159 | static inline int snd_info_card_create(struct snd_card * card) { return 0; } | 166 | static inline int snd_info_card_create(struct snd_card *card) { return 0; } |
160 | static inline int snd_info_card_register(struct snd_card * card) { return 0; } | 167 | static inline int snd_info_card_register(struct snd_card *card) { return 0; } |
161 | static inline int snd_info_card_free(struct snd_card * card) { return 0; } | 168 | static inline int snd_info_card_free(struct snd_card *card) { return 0; } |
162 | static inline void snd_info_card_disconnect(struct snd_card * card) { } | 169 | static inline void snd_info_card_disconnect(struct snd_card *card) { } |
163 | static inline int snd_info_register(struct snd_info_entry * entry) { return 0; } | 170 | static inline void snd_info_card_id_change(struct snd_card *card) { } |
171 | static inline int snd_info_register(struct snd_info_entry *entry) { return 0; } | ||
164 | 172 | ||
165 | static inline int snd_card_proc_new(struct snd_card *card, const char *name, | 173 | static inline int snd_card_proc_new(struct snd_card *card, const char *name, |
166 | struct snd_info_entry **entryp) { return -EINVAL; } | 174 | struct snd_info_entry **entryp) { return -EINVAL; } |
diff --git a/include/sound/jack.h b/include/sound/jack.h index b1b2b8b59adb..2e0315cdd0d6 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h | |||
@@ -35,6 +35,8 @@ enum snd_jack_types { | |||
35 | SND_JACK_HEADPHONE = 0x0001, | 35 | SND_JACK_HEADPHONE = 0x0001, |
36 | SND_JACK_MICROPHONE = 0x0002, | 36 | SND_JACK_MICROPHONE = 0x0002, |
37 | SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE, | 37 | SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE, |
38 | SND_JACK_LINEOUT = 0x0004, | ||
39 | SND_JACK_MECHANICAL = 0x0008, /* If detected separately */ | ||
38 | }; | 40 | }; |
39 | 41 | ||
40 | struct snd_jack { | 42 | struct snd_jack { |
diff --git a/include/sound/l3.h b/include/sound/l3.h new file mode 100644 index 000000000000..423a08f0f1b0 --- /dev/null +++ b/include/sound/l3.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _L3_H_ | ||
2 | #define _L3_H_ 1 | ||
3 | |||
4 | struct l3_pins { | ||
5 | void (*setdat)(int); | ||
6 | void (*setclk)(int); | ||
7 | void (*setmode)(int); | ||
8 | int data_hold; | ||
9 | int data_setup; | ||
10 | int clock_high; | ||
11 | int mode_hold; | ||
12 | int mode; | ||
13 | int mode_setup; | ||
14 | }; | ||
15 | |||
16 | int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len); | ||
17 | |||
18 | #endif | ||
diff --git a/include/sound/s3c24xx_uda134x.h b/include/sound/s3c24xx_uda134x.h new file mode 100644 index 000000000000..33df4cb909d3 --- /dev/null +++ b/include/sound/s3c24xx_uda134x.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _S3C24XX_UDA134X_H_ | ||
2 | #define _S3C24XX_UDA134X_H_ 1 | ||
3 | |||
4 | #include <sound/uda134x.h> | ||
5 | |||
6 | struct s3c24xx_uda134x_platform_data { | ||
7 | int l3_clk; | ||
8 | int l3_mode; | ||
9 | int l3_data; | ||
10 | void (*power) (int); | ||
11 | int model; | ||
12 | }; | ||
13 | |||
14 | #endif | ||
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h new file mode 100644 index 000000000000..24247f763608 --- /dev/null +++ b/include/sound/soc-dai.h | |||
@@ -0,0 +1,231 @@ | |||
1 | /* | ||
2 | * linux/sound/soc-dai.h -- ALSA SoC Layer | ||
3 | * | ||
4 | * Copyright: 2005-2008 Wolfson Microelectronics. PLC. | ||
5 | * | ||
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 | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Digital Audio Interface (DAI) API. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_SND_SOC_DAI_H | ||
14 | #define __LINUX_SND_SOC_DAI_H | ||
15 | |||
16 | |||
17 | #include <linux/list.h> | ||
18 | |||
19 | struct snd_pcm_substream; | ||
20 | |||
21 | /* | ||
22 | * DAI hardware audio formats. | ||
23 | * | ||
24 | * Describes the physical PCM data formating and clocking. Add new formats | ||
25 | * to the end. | ||
26 | */ | ||
27 | #define SND_SOC_DAIFMT_I2S 0 /* I2S mode */ | ||
28 | #define SND_SOC_DAIFMT_RIGHT_J 1 /* Right Justified mode */ | ||
29 | #define SND_SOC_DAIFMT_LEFT_J 2 /* Left Justified mode */ | ||
30 | #define SND_SOC_DAIFMT_DSP_A 3 /* L data msb after FRM LRC */ | ||
31 | #define SND_SOC_DAIFMT_DSP_B 4 /* L data msb during FRM LRC */ | ||
32 | #define SND_SOC_DAIFMT_AC97 5 /* AC97 */ | ||
33 | |||
34 | /* left and right justified also known as MSB and LSB respectively */ | ||
35 | #define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J | ||
36 | #define SND_SOC_DAIFMT_LSB SND_SOC_DAIFMT_RIGHT_J | ||
37 | |||
38 | /* | ||
39 | * DAI Clock gating. | ||
40 | * | ||
41 | * DAI bit clocks can be be gated (disabled) when not the DAI is not | ||
42 | * sending or receiving PCM data in a frame. This can be used to save power. | ||
43 | */ | ||
44 | #define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */ | ||
45 | #define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated */ | ||
46 | |||
47 | /* | ||
48 | * DAI Left/Right Clocks. | ||
49 | * | ||
50 | * Specifies whether the DAI can support different samples for similtanious | ||
51 | * playback and capture. This usually requires a seperate physical frame | ||
52 | * clock for playback and capture. | ||
53 | */ | ||
54 | #define SND_SOC_DAIFMT_SYNC (0 << 5) /* Tx FRM = Rx FRM */ | ||
55 | #define SND_SOC_DAIFMT_ASYNC (1 << 5) /* Tx FRM ~ Rx FRM */ | ||
56 | |||
57 | /* | ||
58 | * TDM | ||
59 | * | ||
60 | * Time Division Multiplexing. Allows PCM data to be multplexed with other | ||
61 | * data on the DAI. | ||
62 | */ | ||
63 | #define SND_SOC_DAIFMT_TDM (1 << 6) | ||
64 | |||
65 | /* | ||
66 | * DAI hardware signal inversions. | ||
67 | * | ||
68 | * Specifies whether the DAI can also support inverted clocks for the specified | ||
69 | * format. | ||
70 | */ | ||
71 | #define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */ | ||
72 | #define SND_SOC_DAIFMT_NB_IF (1 << 8) /* normal bclk + inv frm */ | ||
73 | #define SND_SOC_DAIFMT_IB_NF (2 << 8) /* invert bclk + nor frm */ | ||
74 | #define SND_SOC_DAIFMT_IB_IF (3 << 8) /* invert bclk + frm */ | ||
75 | |||
76 | /* | ||
77 | * DAI hardware clock masters. | ||
78 | * | ||
79 | * This is wrt the codec, the inverse is true for the interface | ||
80 | * i.e. if the codec is clk and frm master then the interface is | ||
81 | * clk and frame slave. | ||
82 | */ | ||
83 | #define SND_SOC_DAIFMT_CBM_CFM (0 << 12) /* codec clk & frm master */ | ||
84 | #define SND_SOC_DAIFMT_CBS_CFM (1 << 12) /* codec clk slave & frm master */ | ||
85 | #define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */ | ||
86 | #define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & frm slave */ | ||
87 | |||
88 | #define SND_SOC_DAIFMT_FORMAT_MASK 0x000f | ||
89 | #define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0 | ||
90 | #define SND_SOC_DAIFMT_INV_MASK 0x0f00 | ||
91 | #define SND_SOC_DAIFMT_MASTER_MASK 0xf000 | ||
92 | |||
93 | /* | ||
94 | * Master Clock Directions | ||
95 | */ | ||
96 | #define SND_SOC_CLOCK_IN 0 | ||
97 | #define SND_SOC_CLOCK_OUT 1 | ||
98 | |||
99 | struct snd_soc_dai_ops; | ||
100 | struct snd_soc_dai; | ||
101 | struct snd_ac97_bus_ops; | ||
102 | |||
103 | /* Digital Audio Interface registration */ | ||
104 | int snd_soc_register_dai(struct snd_soc_dai *dai); | ||
105 | void snd_soc_unregister_dai(struct snd_soc_dai *dai); | ||
106 | int snd_soc_register_dais(struct snd_soc_dai *dai, size_t count); | ||
107 | void snd_soc_unregister_dais(struct snd_soc_dai *dai, size_t count); | ||
108 | |||
109 | /* Digital Audio Interface clocking API.*/ | ||
110 | int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, | ||
111 | unsigned int freq, int dir); | ||
112 | |||
113 | int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, | ||
114 | int div_id, int div); | ||
115 | |||
116 | int snd_soc_dai_set_pll(struct snd_soc_dai *dai, | ||
117 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
118 | |||
119 | /* Digital Audio interface formatting */ | ||
120 | int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt); | ||
121 | |||
122 | int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, | ||
123 | unsigned int mask, int slots); | ||
124 | |||
125 | int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); | ||
126 | |||
127 | /* Digital Audio Interface mute */ | ||
128 | int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute); | ||
129 | |||
130 | /* | ||
131 | * Digital Audio Interface. | ||
132 | * | ||
133 | * Describes the Digital Audio Interface in terms of it's ALSA, DAI and AC97 | ||
134 | * operations an capabilities. Codec and platfom drivers will register a this | ||
135 | * structure for every DAI they have. | ||
136 | * | ||
137 | * This structure covers the clocking, formating and ALSA operations for each | ||
138 | * interface a | ||
139 | */ | ||
140 | struct snd_soc_dai_ops { | ||
141 | /* | ||
142 | * DAI clocking configuration, all optional. | ||
143 | * Called by soc_card drivers, normally in their hw_params. | ||
144 | */ | ||
145 | int (*set_sysclk)(struct snd_soc_dai *dai, | ||
146 | int clk_id, unsigned int freq, int dir); | ||
147 | int (*set_pll)(struct snd_soc_dai *dai, | ||
148 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
149 | int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div); | ||
150 | |||
151 | /* | ||
152 | * DAI format configuration | ||
153 | * Called by soc_card drivers, normally in their hw_params. | ||
154 | */ | ||
155 | int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt); | ||
156 | int (*set_tdm_slot)(struct snd_soc_dai *dai, | ||
157 | unsigned int mask, int slots); | ||
158 | int (*set_tristate)(struct snd_soc_dai *dai, int tristate); | ||
159 | |||
160 | /* | ||
161 | * DAI digital mute - optional. | ||
162 | * Called by soc-core to minimise any pops. | ||
163 | */ | ||
164 | int (*digital_mute)(struct snd_soc_dai *dai, int mute); | ||
165 | |||
166 | /* | ||
167 | * ALSA PCM audio operations - all optional. | ||
168 | * Called by soc-core during audio PCM operations. | ||
169 | */ | ||
170 | int (*startup)(struct snd_pcm_substream *, | ||
171 | struct snd_soc_dai *); | ||
172 | void (*shutdown)(struct snd_pcm_substream *, | ||
173 | struct snd_soc_dai *); | ||
174 | int (*hw_params)(struct snd_pcm_substream *, | ||
175 | struct snd_pcm_hw_params *, struct snd_soc_dai *); | ||
176 | int (*hw_free)(struct snd_pcm_substream *, | ||
177 | struct snd_soc_dai *); | ||
178 | int (*prepare)(struct snd_pcm_substream *, | ||
179 | struct snd_soc_dai *); | ||
180 | int (*trigger)(struct snd_pcm_substream *, int, | ||
181 | struct snd_soc_dai *); | ||
182 | }; | ||
183 | |||
184 | /* | ||
185 | * Digital Audio Interface runtime data. | ||
186 | * | ||
187 | * Holds runtime data for a DAI. | ||
188 | */ | ||
189 | struct snd_soc_dai { | ||
190 | /* DAI description */ | ||
191 | char *name; | ||
192 | unsigned int id; | ||
193 | int ac97_control; | ||
194 | |||
195 | struct device *dev; | ||
196 | |||
197 | /* DAI callbacks */ | ||
198 | int (*probe)(struct platform_device *pdev, | ||
199 | struct snd_soc_dai *dai); | ||
200 | void (*remove)(struct platform_device *pdev, | ||
201 | struct snd_soc_dai *dai); | ||
202 | int (*suspend)(struct snd_soc_dai *dai); | ||
203 | int (*resume)(struct snd_soc_dai *dai); | ||
204 | |||
205 | /* ops */ | ||
206 | struct snd_soc_dai_ops ops; | ||
207 | |||
208 | /* DAI capabilities */ | ||
209 | struct snd_soc_pcm_stream capture; | ||
210 | struct snd_soc_pcm_stream playback; | ||
211 | |||
212 | /* DAI runtime info */ | ||
213 | struct snd_pcm_runtime *runtime; | ||
214 | struct snd_soc_codec *codec; | ||
215 | unsigned int active; | ||
216 | unsigned char pop_wait:1; | ||
217 | void *dma_data; | ||
218 | |||
219 | /* DAI private data */ | ||
220 | void *private_data; | ||
221 | |||
222 | /* parent codec/platform */ | ||
223 | union { | ||
224 | struct snd_soc_codec *codec; | ||
225 | struct snd_soc_platform *platform; | ||
226 | }; | ||
227 | |||
228 | struct list_head list; | ||
229 | }; | ||
230 | |||
231 | #endif | ||
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index ca699a3017f3..7ee2f70ca42e 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -221,8 +221,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, | |||
221 | int num); | 221 | int num); |
222 | 222 | ||
223 | /* dapm path setup */ | 223 | /* dapm path setup */ |
224 | int __deprecated snd_soc_dapm_connect_input(struct snd_soc_codec *codec, | ||
225 | const char *sink_name, const char *control_name, const char *src_name); | ||
226 | int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec); | 224 | int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec); |
227 | void snd_soc_dapm_free(struct snd_soc_device *socdev); | 225 | void snd_soc_dapm_free(struct snd_soc_device *socdev); |
228 | int snd_soc_dapm_add_routes(struct snd_soc_codec *codec, | 226 | int snd_soc_dapm_add_routes(struct snd_soc_codec *codec, |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 5e0189876afd..f86e455d3828 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <sound/control.h> | 21 | #include <sound/control.h> |
22 | #include <sound/ac97_codec.h> | 22 | #include <sound/ac97_codec.h> |
23 | 23 | ||
24 | #define SND_SOC_VERSION "0.13.2" | ||
25 | |||
26 | /* | 24 | /* |
27 | * Convenience kcontrol builders | 25 | * Convenience kcontrol builders |
28 | */ | 26 | */ |
@@ -145,105 +143,31 @@ enum snd_soc_bias_level { | |||
145 | SND_SOC_BIAS_OFF, | 143 | SND_SOC_BIAS_OFF, |
146 | }; | 144 | }; |
147 | 145 | ||
148 | /* | ||
149 | * Digital Audio Interface (DAI) types | ||
150 | */ | ||
151 | #define SND_SOC_DAI_AC97 0x1 | ||
152 | #define SND_SOC_DAI_I2S 0x2 | ||
153 | #define SND_SOC_DAI_PCM 0x4 | ||
154 | #define SND_SOC_DAI_AC97_BUS 0x8 /* for custom i.e. non ac97_codec.c */ | ||
155 | |||
156 | /* | ||
157 | * DAI hardware audio formats | ||
158 | */ | ||
159 | #define SND_SOC_DAIFMT_I2S 0 /* I2S mode */ | ||
160 | #define SND_SOC_DAIFMT_RIGHT_J 1 /* Right justified mode */ | ||
161 | #define SND_SOC_DAIFMT_LEFT_J 2 /* Left Justified mode */ | ||
162 | #define SND_SOC_DAIFMT_DSP_A 3 /* L data msb after FRM or LRC */ | ||
163 | #define SND_SOC_DAIFMT_DSP_B 4 /* L data msb during FRM or LRC */ | ||
164 | #define SND_SOC_DAIFMT_AC97 5 /* AC97 */ | ||
165 | |||
166 | #define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J | ||
167 | #define SND_SOC_DAIFMT_LSB SND_SOC_DAIFMT_RIGHT_J | ||
168 | |||
169 | /* | ||
170 | * DAI Gating | ||
171 | */ | ||
172 | #define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */ | ||
173 | #define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated when not Tx/Rx */ | ||
174 | |||
175 | /* | ||
176 | * DAI Sync | ||
177 | * Synchronous LR (Left Right) clocks and Frame signals. | ||
178 | */ | ||
179 | #define SND_SOC_DAIFMT_SYNC (0 << 5) /* Tx FRM = Rx FRM */ | ||
180 | #define SND_SOC_DAIFMT_ASYNC (1 << 5) /* Tx FRM ~ Rx FRM */ | ||
181 | |||
182 | /* | ||
183 | * TDM | ||
184 | */ | ||
185 | #define SND_SOC_DAIFMT_TDM (1 << 6) | ||
186 | |||
187 | /* | ||
188 | * DAI hardware signal inversions | ||
189 | */ | ||
190 | #define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bclk + frm */ | ||
191 | #define SND_SOC_DAIFMT_NB_IF (1 << 8) /* normal bclk + inv frm */ | ||
192 | #define SND_SOC_DAIFMT_IB_NF (2 << 8) /* invert bclk + nor frm */ | ||
193 | #define SND_SOC_DAIFMT_IB_IF (3 << 8) /* invert bclk + frm */ | ||
194 | |||
195 | /* | ||
196 | * DAI hardware clock masters | ||
197 | * This is wrt the codec, the inverse is true for the interface | ||
198 | * i.e. if the codec is clk and frm master then the interface is | ||
199 | * clk and frame slave. | ||
200 | */ | ||
201 | #define SND_SOC_DAIFMT_CBM_CFM (0 << 12) /* codec clk & frm master */ | ||
202 | #define SND_SOC_DAIFMT_CBS_CFM (1 << 12) /* codec clk slave & frm master */ | ||
203 | #define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */ | ||
204 | #define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & frm slave */ | ||
205 | |||
206 | #define SND_SOC_DAIFMT_FORMAT_MASK 0x000f | ||
207 | #define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0 | ||
208 | #define SND_SOC_DAIFMT_INV_MASK 0x0f00 | ||
209 | #define SND_SOC_DAIFMT_MASTER_MASK 0xf000 | ||
210 | |||
211 | |||
212 | /* | ||
213 | * Master Clock Directions | ||
214 | */ | ||
215 | #define SND_SOC_CLOCK_IN 0 | ||
216 | #define SND_SOC_CLOCK_OUT 1 | ||
217 | |||
218 | /* | ||
219 | * AC97 codec ID's bitmask | ||
220 | */ | ||
221 | #define SND_SOC_DAI_AC97_ID0 (1 << 0) | ||
222 | #define SND_SOC_DAI_AC97_ID1 (1 << 1) | ||
223 | #define SND_SOC_DAI_AC97_ID2 (1 << 2) | ||
224 | #define SND_SOC_DAI_AC97_ID3 (1 << 3) | ||
225 | |||
226 | struct snd_soc_device; | 146 | struct snd_soc_device; |
227 | struct snd_soc_pcm_stream; | 147 | struct snd_soc_pcm_stream; |
228 | struct snd_soc_ops; | 148 | struct snd_soc_ops; |
229 | struct snd_soc_dai_mode; | 149 | struct snd_soc_dai_mode; |
230 | struct snd_soc_pcm_runtime; | 150 | struct snd_soc_pcm_runtime; |
231 | struct snd_soc_dai; | 151 | struct snd_soc_dai; |
152 | struct snd_soc_platform; | ||
232 | struct snd_soc_codec; | 153 | struct snd_soc_codec; |
233 | struct snd_soc_machine_config; | ||
234 | struct soc_enum; | 154 | struct soc_enum; |
235 | struct snd_soc_ac97_ops; | 155 | struct snd_soc_ac97_ops; |
236 | struct snd_soc_clock_info; | ||
237 | 156 | ||
238 | typedef int (*hw_write_t)(void *,const char* ,int); | 157 | typedef int (*hw_write_t)(void *,const char* ,int); |
239 | typedef int (*hw_read_t)(void *,char* ,int); | 158 | typedef int (*hw_read_t)(void *,char* ,int); |
240 | 159 | ||
241 | extern struct snd_ac97_bus_ops soc_ac97_ops; | 160 | extern struct snd_ac97_bus_ops soc_ac97_ops; |
242 | 161 | ||
162 | int snd_soc_register_platform(struct snd_soc_platform *platform); | ||
163 | void snd_soc_unregister_platform(struct snd_soc_platform *platform); | ||
164 | int snd_soc_register_codec(struct snd_soc_codec *codec); | ||
165 | void snd_soc_unregister_codec(struct snd_soc_codec *codec); | ||
166 | |||
243 | /* pcm <-> DAI connect */ | 167 | /* pcm <-> DAI connect */ |
244 | void snd_soc_free_pcms(struct snd_soc_device *socdev); | 168 | void snd_soc_free_pcms(struct snd_soc_device *socdev); |
245 | int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid); | 169 | int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid); |
246 | int snd_soc_register_card(struct snd_soc_device *socdev); | 170 | int snd_soc_init_card(struct snd_soc_device *socdev); |
247 | 171 | ||
248 | /* set runtime hw params */ | 172 | /* set runtime hw params */ |
249 | int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, | 173 | int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, |
@@ -263,27 +187,6 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, | |||
263 | struct snd_ac97_bus_ops *ops, int num); | 187 | struct snd_ac97_bus_ops *ops, int num); |
264 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | 188 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); |
265 | 189 | ||
266 | /* Digital Audio Interface clocking API.*/ | ||
267 | int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, | ||
268 | unsigned int freq, int dir); | ||
269 | |||
270 | int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, | ||
271 | int div_id, int div); | ||
272 | |||
273 | int snd_soc_dai_set_pll(struct snd_soc_dai *dai, | ||
274 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
275 | |||
276 | /* Digital Audio interface formatting */ | ||
277 | int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt); | ||
278 | |||
279 | int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, | ||
280 | unsigned int mask, int slots); | ||
281 | |||
282 | int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); | ||
283 | |||
284 | /* Digital Audio Interface mute */ | ||
285 | int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute); | ||
286 | |||
287 | /* | 190 | /* |
288 | *Controls | 191 | *Controls |
289 | */ | 192 | */ |
@@ -341,66 +244,14 @@ struct snd_soc_ops { | |||
341 | int (*trigger)(struct snd_pcm_substream *, int); | 244 | int (*trigger)(struct snd_pcm_substream *, int); |
342 | }; | 245 | }; |
343 | 246 | ||
344 | /* ASoC DAI ops */ | ||
345 | struct snd_soc_dai_ops { | ||
346 | /* DAI clocking configuration */ | ||
347 | int (*set_sysclk)(struct snd_soc_dai *dai, | ||
348 | int clk_id, unsigned int freq, int dir); | ||
349 | int (*set_pll)(struct snd_soc_dai *dai, | ||
350 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
351 | int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div); | ||
352 | |||
353 | /* DAI format configuration */ | ||
354 | int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt); | ||
355 | int (*set_tdm_slot)(struct snd_soc_dai *dai, | ||
356 | unsigned int mask, int slots); | ||
357 | int (*set_tristate)(struct snd_soc_dai *dai, int tristate); | ||
358 | |||
359 | /* digital mute */ | ||
360 | int (*digital_mute)(struct snd_soc_dai *dai, int mute); | ||
361 | }; | ||
362 | |||
363 | /* SoC DAI (Digital Audio Interface) */ | ||
364 | struct snd_soc_dai { | ||
365 | /* DAI description */ | ||
366 | char *name; | ||
367 | unsigned int id; | ||
368 | unsigned char type; | ||
369 | |||
370 | /* DAI callbacks */ | ||
371 | int (*probe)(struct platform_device *pdev, | ||
372 | struct snd_soc_dai *dai); | ||
373 | void (*remove)(struct platform_device *pdev, | ||
374 | struct snd_soc_dai *dai); | ||
375 | int (*suspend)(struct platform_device *pdev, | ||
376 | struct snd_soc_dai *dai); | ||
377 | int (*resume)(struct platform_device *pdev, | ||
378 | struct snd_soc_dai *dai); | ||
379 | |||
380 | /* ops */ | ||
381 | struct snd_soc_ops ops; | ||
382 | struct snd_soc_dai_ops dai_ops; | ||
383 | |||
384 | /* DAI capabilities */ | ||
385 | struct snd_soc_pcm_stream capture; | ||
386 | struct snd_soc_pcm_stream playback; | ||
387 | |||
388 | /* DAI runtime info */ | ||
389 | struct snd_pcm_runtime *runtime; | ||
390 | struct snd_soc_codec *codec; | ||
391 | unsigned int active; | ||
392 | unsigned char pop_wait:1; | ||
393 | void *dma_data; | ||
394 | |||
395 | /* DAI private data */ | ||
396 | void *private_data; | ||
397 | }; | ||
398 | |||
399 | /* SoC Audio Codec */ | 247 | /* SoC Audio Codec */ |
400 | struct snd_soc_codec { | 248 | struct snd_soc_codec { |
401 | char *name; | 249 | char *name; |
402 | struct module *owner; | 250 | struct module *owner; |
403 | struct mutex mutex; | 251 | struct mutex mutex; |
252 | struct device *dev; | ||
253 | |||
254 | struct list_head list; | ||
404 | 255 | ||
405 | /* callbacks */ | 256 | /* callbacks */ |
406 | int (*set_bias_level)(struct snd_soc_codec *, | 257 | int (*set_bias_level)(struct snd_soc_codec *, |
@@ -426,6 +277,7 @@ struct snd_soc_codec { | |||
426 | short reg_cache_step; | 277 | short reg_cache_step; |
427 | 278 | ||
428 | /* dapm */ | 279 | /* dapm */ |
280 | u32 pop_time; | ||
429 | struct list_head dapm_widgets; | 281 | struct list_head dapm_widgets; |
430 | struct list_head dapm_paths; | 282 | struct list_head dapm_paths; |
431 | enum snd_soc_bias_level bias_level; | 283 | enum snd_soc_bias_level bias_level; |
@@ -435,6 +287,11 @@ struct snd_soc_codec { | |||
435 | /* codec DAI's */ | 287 | /* codec DAI's */ |
436 | struct snd_soc_dai *dai; | 288 | struct snd_soc_dai *dai; |
437 | unsigned int num_dai; | 289 | unsigned int num_dai; |
290 | |||
291 | #ifdef CONFIG_DEBUG_FS | ||
292 | struct dentry *debugfs_reg; | ||
293 | struct dentry *debugfs_pop_time; | ||
294 | #endif | ||
438 | }; | 295 | }; |
439 | 296 | ||
440 | /* codec device */ | 297 | /* codec device */ |
@@ -448,13 +305,12 @@ struct snd_soc_codec_device { | |||
448 | /* SoC platform interface */ | 305 | /* SoC platform interface */ |
449 | struct snd_soc_platform { | 306 | struct snd_soc_platform { |
450 | char *name; | 307 | char *name; |
308 | struct list_head list; | ||
451 | 309 | ||
452 | int (*probe)(struct platform_device *pdev); | 310 | int (*probe)(struct platform_device *pdev); |
453 | int (*remove)(struct platform_device *pdev); | 311 | int (*remove)(struct platform_device *pdev); |
454 | int (*suspend)(struct platform_device *pdev, | 312 | int (*suspend)(struct snd_soc_dai *dai); |
455 | struct snd_soc_dai *dai); | 313 | int (*resume)(struct snd_soc_dai *dai); |
456 | int (*resume)(struct platform_device *pdev, | ||
457 | struct snd_soc_dai *dai); | ||
458 | 314 | ||
459 | /* pcm creation and destruction */ | 315 | /* pcm creation and destruction */ |
460 | int (*pcm_new)(struct snd_card *, struct snd_soc_dai *, | 316 | int (*pcm_new)(struct snd_card *, struct snd_soc_dai *, |
@@ -484,9 +340,14 @@ struct snd_soc_dai_link { | |||
484 | struct snd_pcm *pcm; | 340 | struct snd_pcm *pcm; |
485 | }; | 341 | }; |
486 | 342 | ||
487 | /* SoC machine */ | 343 | /* SoC card */ |
488 | struct snd_soc_machine { | 344 | struct snd_soc_card { |
489 | char *name; | 345 | char *name; |
346 | struct device *dev; | ||
347 | |||
348 | struct list_head list; | ||
349 | |||
350 | int instantiated; | ||
490 | 351 | ||
491 | int (*probe)(struct platform_device *pdev); | 352 | int (*probe)(struct platform_device *pdev); |
492 | int (*remove)(struct platform_device *pdev); | 353 | int (*remove)(struct platform_device *pdev); |
@@ -499,23 +360,26 @@ struct snd_soc_machine { | |||
499 | int (*resume_post)(struct platform_device *pdev); | 360 | int (*resume_post)(struct platform_device *pdev); |
500 | 361 | ||
501 | /* callbacks */ | 362 | /* callbacks */ |
502 | int (*set_bias_level)(struct snd_soc_machine *, | 363 | int (*set_bias_level)(struct snd_soc_card *, |
503 | enum snd_soc_bias_level level); | 364 | enum snd_soc_bias_level level); |
504 | 365 | ||
505 | /* CPU <--> Codec DAI links */ | 366 | /* CPU <--> Codec DAI links */ |
506 | struct snd_soc_dai_link *dai_link; | 367 | struct snd_soc_dai_link *dai_link; |
507 | int num_links; | 368 | int num_links; |
369 | |||
370 | struct snd_soc_device *socdev; | ||
371 | |||
372 | struct snd_soc_platform *platform; | ||
373 | struct delayed_work delayed_work; | ||
374 | struct work_struct deferred_resume_work; | ||
508 | }; | 375 | }; |
509 | 376 | ||
510 | /* SoC Device - the audio subsystem */ | 377 | /* SoC Device - the audio subsystem */ |
511 | struct snd_soc_device { | 378 | struct snd_soc_device { |
512 | struct device *dev; | 379 | struct device *dev; |
513 | struct snd_soc_machine *machine; | 380 | struct snd_soc_card *card; |
514 | struct snd_soc_platform *platform; | ||
515 | struct snd_soc_codec *codec; | 381 | struct snd_soc_codec *codec; |
516 | struct snd_soc_codec_device *codec_dev; | 382 | struct snd_soc_codec_device *codec_dev; |
517 | struct delayed_work delayed_work; | ||
518 | struct work_struct deferred_resume_work; | ||
519 | void *codec_data; | 383 | void *codec_data; |
520 | }; | 384 | }; |
521 | 385 | ||
@@ -542,4 +406,6 @@ struct soc_enum { | |||
542 | void *dapm; | 406 | void *dapm; |
543 | }; | 407 | }; |
544 | 408 | ||
409 | #include <sound/soc-dai.h> | ||
410 | |||
545 | #endif | 411 | #endif |
diff --git a/include/sound/uda134x.h b/include/sound/uda134x.h new file mode 100644 index 000000000000..475ef8bb7dcd --- /dev/null +++ b/include/sound/uda134x.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * uda134x.h -- UDA134x ALSA SoC Codec driver | ||
3 | * | ||
4 | * Copyright 2007 Dension Audio Systems Ltd. | ||
5 | * Author: Zoltan Devai | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _UDA134X_H | ||
13 | #define _UDA134X_H | ||
14 | |||
15 | #include <sound/l3.h> | ||
16 | |||
17 | struct uda134x_platform_data { | ||
18 | struct l3_pins l3; | ||
19 | void (*power) (int); | ||
20 | int model; | ||
21 | #define UDA134X_UDA1340 1 | ||
22 | #define UDA134X_UDA1341 2 | ||
23 | #define UDA134X_UDA1344 3 | ||
24 | }; | ||
25 | |||
26 | #endif /* _UDA134X_H */ | ||
diff --git a/include/sound/version.h b/include/sound/version.h index 4aafeda88634..2b48237e23bf 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h */ | 1 | /* include/version.h */ |
2 | #define CONFIG_SND_VERSION "1.0.18rc3" | 2 | #define CONFIG_SND_VERSION "1.0.18a" |
3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |