diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 13:46:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 13:46:37 -0400 |
commit | d3e458d78167102cc961237cfceef6fffc80c0b3 (patch) | |
tree | e9195c1294daf053614e63ac52b0b44a28479017 /include | |
parent | f2e1fbb5f2177227f71c4fc0491e531dd7acd385 (diff) | |
parent | d351cf4603edb2a5bfa9a48d06c425511c63f2a3 (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: (308 commits)
ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
ALSA: aloop - Fix possible IRQ lock inversion
ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail()
ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination
ALSA: firewire - msleep needs delay.h
ALSA: firewire-lib, firewire-speakers: handle packet queueing errors
ALSA: firewire-lib: allocate DMA buffer separately
ALSA: firewire-lib: use no-info SYT for packets without SYT sample
ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver
ALSA: hda - Remove an unused variable in patch_realtek.c
ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
ALSA: hda - Move default input-src selection to init part
ALSA: hda - Initialize special cases for input src in init phase
ALSA: ctxfi - Clear input settings before initialization
ALSA: ctxfi - Fix SPDIF status retrieval
ALSA: ctxfi - Fix incorrect SPDIF status bit mask
ALSA: ctxfi - Fix microphone boost codes/comments
ALSA: atiixp - Fix wrong time-out checks during ac-link reset
ALSA: intel8x0m: append 'm' to "r_intel8x0"
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/firewire.h | 7 | ||||
-rw-r--r-- | include/linux/mfd/wm8994/pdata.h | 12 | ||||
-rw-r--r-- | include/linux/mfd/wm8994/registers.h | 2 | ||||
-rw-r--r-- | include/sound/ac97_codec.h | 5 | ||||
-rw-r--r-- | include/sound/control.h | 2 | ||||
-rw-r--r-- | include/sound/cs4271.h | 24 | ||||
-rw-r--r-- | include/sound/hdspm.h | 179 | ||||
-rw-r--r-- | include/sound/mixer_oss.h | 3 | ||||
-rw-r--r-- | include/sound/pcm.h | 91 | ||||
-rw-r--r-- | include/sound/sh_fsi.h | 76 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 16 | ||||
-rw-r--r-- | include/sound/soc.h | 147 | ||||
-rw-r--r-- | include/sound/tlv320aic32x4.h | 31 | ||||
-rw-r--r-- | include/sound/version.h | 2 | ||||
-rw-r--r-- | include/sound/wm8903.h | 20 | ||||
-rw-r--r-- | include/sound/wm9081.h | 9 | ||||
-rw-r--r-- | include/trace/events/asoc.h | 25 |
17 files changed, 488 insertions, 163 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 9a3f5f9383f6..fc023d67676f 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -42,6 +42,10 @@ | |||
42 | #define CSR_BROADCAST_CHANNEL 0x234 | 42 | #define CSR_BROADCAST_CHANNEL 0x234 |
43 | #define CSR_CONFIG_ROM 0x400 | 43 | #define CSR_CONFIG_ROM 0x400 |
44 | #define CSR_CONFIG_ROM_END 0x800 | 44 | #define CSR_CONFIG_ROM_END 0x800 |
45 | #define CSR_OMPR 0x900 | ||
46 | #define CSR_OPCR(i) (0x904 + (i) * 4) | ||
47 | #define CSR_IMPR 0x980 | ||
48 | #define CSR_IPCR(i) (0x984 + (i) * 4) | ||
45 | #define CSR_FCP_COMMAND 0xB00 | 49 | #define CSR_FCP_COMMAND 0xB00 |
46 | #define CSR_FCP_RESPONSE 0xD00 | 50 | #define CSR_FCP_RESPONSE 0xD00 |
47 | #define CSR_FCP_END 0xF00 | 51 | #define CSR_FCP_END 0xF00 |
@@ -441,5 +445,8 @@ int fw_iso_context_start(struct fw_iso_context *ctx, | |||
441 | int cycle, int sync, int tags); | 445 | int cycle, int sync, int tags); |
442 | int fw_iso_context_stop(struct fw_iso_context *ctx); | 446 | int fw_iso_context_stop(struct fw_iso_context *ctx); |
443 | void fw_iso_context_destroy(struct fw_iso_context *ctx); | 447 | void fw_iso_context_destroy(struct fw_iso_context *ctx); |
448 | void fw_iso_resource_manage(struct fw_card *card, int generation, | ||
449 | u64 channels_mask, int *channel, int *bandwidth, | ||
450 | bool allocate, __be32 buffer[2]); | ||
444 | 451 | ||
445 | #endif /* _LINUX_FIREWIRE_H */ | 452 | #endif /* _LINUX_FIREWIRE_H */ |
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 9eab263658be..466b1c777aff 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -103,13 +103,21 @@ struct wm8994_pdata { | |||
103 | unsigned int lineout1fb:1; | 103 | unsigned int lineout1fb:1; |
104 | unsigned int lineout2fb:1; | 104 | unsigned int lineout2fb:1; |
105 | 105 | ||
106 | /* Microphone biases: 0=0.9*AVDD1 1=0.65*AVVD1 */ | 106 | /* IRQ for microphone detection if brought out directly as a |
107 | * signal. | ||
108 | */ | ||
109 | int micdet_irq; | ||
110 | |||
111 | /* WM8994 microphone biases: 0=0.9*AVDD1 1=0.65*AVVD1 */ | ||
107 | unsigned int micbias1_lvl:1; | 112 | unsigned int micbias1_lvl:1; |
108 | unsigned int micbias2_lvl:1; | 113 | unsigned int micbias2_lvl:1; |
109 | 114 | ||
110 | /* Jack detect threashold levels, see datasheet for values */ | 115 | /* WM8994 jack detect threashold levels, see datasheet for values */ |
111 | unsigned int jd_scthr:2; | 116 | unsigned int jd_scthr:2; |
112 | unsigned int jd_thr:2; | 117 | unsigned int jd_thr:2; |
118 | |||
119 | /* WM8958 microphone bias configuration */ | ||
120 | int micbias[2]; | ||
113 | }; | 121 | }; |
114 | 122 | ||
115 | #endif | 123 | #endif |
diff --git a/include/linux/mfd/wm8994/registers.h b/include/linux/mfd/wm8994/registers.h index be072faec6f0..f3ee84284670 100644 --- a/include/linux/mfd/wm8994/registers.h +++ b/include/linux/mfd/wm8994/registers.h | |||
@@ -63,6 +63,8 @@ | |||
63 | #define WM8994_MICBIAS 0x3A | 63 | #define WM8994_MICBIAS 0x3A |
64 | #define WM8994_LDO_1 0x3B | 64 | #define WM8994_LDO_1 0x3B |
65 | #define WM8994_LDO_2 0x3C | 65 | #define WM8994_LDO_2 0x3C |
66 | #define WM8958_MICBIAS1 0x3D | ||
67 | #define WM8958_MICBIAS2 0x3E | ||
66 | #define WM8994_CHARGE_PUMP_1 0x4C | 68 | #define WM8994_CHARGE_PUMP_1 0x4C |
67 | #define WM8958_CHARGE_PUMP_2 0x4D | 69 | #define WM8958_CHARGE_PUMP_2 0x4D |
68 | #define WM8994_CLASS_W_1 0x51 | 70 | #define WM8994_CLASS_W_1 0x51 |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index b602f475cdbb..f1dcefe4532b 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -96,6 +96,10 @@ | |||
96 | #define AC97_FUNC_INFO 0x68 /* Function Information */ | 96 | #define AC97_FUNC_INFO 0x68 /* Function Information */ |
97 | #define AC97_SENSE_INFO 0x6a /* Sense Details */ | 97 | #define AC97_SENSE_INFO 0x6a /* Sense Details */ |
98 | 98 | ||
99 | /* volume controls */ | ||
100 | #define AC97_MUTE_MASK_MONO 0x8000 | ||
101 | #define AC97_MUTE_MASK_STEREO 0x8080 | ||
102 | |||
99 | /* slot allocation */ | 103 | /* slot allocation */ |
100 | #define AC97_SLOT_TAG 0 | 104 | #define AC97_SLOT_TAG 0 |
101 | #define AC97_SLOT_CMD_ADDR 1 | 105 | #define AC97_SLOT_CMD_ADDR 1 |
@@ -138,6 +142,7 @@ | |||
138 | #define AC97_BC_18BIT_ADC 0x0100 /* 18-bit ADC resolution */ | 142 | #define AC97_BC_18BIT_ADC 0x0100 /* 18-bit ADC resolution */ |
139 | #define AC97_BC_20BIT_ADC 0x0200 /* 20-bit ADC resolution */ | 143 | #define AC97_BC_20BIT_ADC 0x0200 /* 20-bit ADC resolution */ |
140 | #define AC97_BC_ADC_MASK 0x0300 | 144 | #define AC97_BC_ADC_MASK 0x0300 |
145 | #define AC97_BC_3D_TECH_ID_MASK 0x7c00 /* Per-vendor ID of 3D enhancement */ | ||
141 | 146 | ||
142 | /* general purpose */ | 147 | /* general purpose */ |
143 | #define AC97_GP_DRSS_MASK 0x0c00 /* double rate slot select */ | 148 | #define AC97_GP_DRSS_MASK 0x0c00 /* double rate slot select */ |
diff --git a/include/sound/control.h b/include/sound/control.h index 7715e6f00d38..e67db2869360 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -115,6 +115,8 @@ int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol); | |||
115 | int snd_ctl_remove(struct snd_card * card, struct snd_kcontrol * kcontrol); | 115 | int snd_ctl_remove(struct snd_card * card, struct snd_kcontrol * kcontrol); |
116 | int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id); | 116 | int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id); |
117 | int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id); | 117 | int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id); |
118 | int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, | ||
119 | int active); | ||
118 | struct snd_kcontrol *snd_ctl_find_numid(struct snd_card * card, unsigned int numid); | 120 | struct snd_kcontrol *snd_ctl_find_numid(struct snd_card * card, unsigned int numid); |
119 | struct snd_kcontrol *snd_ctl_find_id(struct snd_card * card, struct snd_ctl_elem_id *id); | 121 | struct snd_kcontrol *snd_ctl_find_id(struct snd_card * card, struct snd_ctl_elem_id *id); |
120 | 122 | ||
diff --git a/include/sound/cs4271.h b/include/sound/cs4271.h new file mode 100644 index 000000000000..50a059e7d116 --- /dev/null +++ b/include/sound/cs4271.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Definitions for CS4271 ASoC codec driver | ||
3 | * | ||
4 | * Copyright (c) 2010 Alexander Sverdlin <subaparts@yandex.ru> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __CS4271_H | ||
18 | #define __CS4271_H | ||
19 | |||
20 | struct cs4271_platform_data { | ||
21 | int gpio_nreset; /* GPIO driving Reset pin, if any */ | ||
22 | }; | ||
23 | |||
24 | #endif /* __CS4271_H */ | ||
diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h index 81990b2bcc98..1774ff5ff632 100644 --- a/include/sound/hdspm.h +++ b/include/sound/hdspm.h | |||
@@ -3,8 +3,8 @@ | |||
3 | /* | 3 | /* |
4 | * Copyright (C) 2003 Winfried Ritsch (IEM) | 4 | * Copyright (C) 2003 Winfried Ritsch (IEM) |
5 | * based on hdsp.h from Thomas Charbonnel (thomas@undata.org) | 5 | * based on hdsp.h from Thomas Charbonnel (thomas@undata.org) |
6 | * | 6 | * |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or | 10 | * the Free Software Foundation; either version 2 of the License, or |
@@ -23,50 +23,41 @@ | |||
23 | /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ | 23 | /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ |
24 | #define HDSPM_MAX_CHANNELS 64 | 24 | #define HDSPM_MAX_CHANNELS 64 |
25 | 25 | ||
26 | /* -------------------- IOCTL Peak/RMS Meters -------------------- */ | 26 | enum hdspm_io_type { |
27 | 27 | MADI, | |
28 | /* peam rms level structure like we get from hardware | 28 | MADIface, |
29 | 29 | AIO, | |
30 | maybe in future we can memory map it so I just copy it | 30 | AES32, |
31 | to user on ioctl call now an dont change anything | 31 | RayDAT |
32 | rms are made out of low and high values | 32 | }; |
33 | where (long) ????_rms = (????_rms_l >> 8) + ((????_rms_h & 0xFFFFFF00)<<24) | ||
34 | (i asume so from the code) | ||
35 | */ | ||
36 | |||
37 | struct hdspm_peak_rms { | ||
38 | |||
39 | unsigned int level_offset[1024]; | ||
40 | 33 | ||
41 | unsigned int input_peak[64]; | 34 | enum hdspm_speed { |
42 | unsigned int playback_peak[64]; | 35 | ss, |
43 | unsigned int output_peak[64]; | 36 | ds, |
44 | unsigned int xxx_peak[64]; /* not used */ | 37 | qs |
38 | }; | ||
45 | 39 | ||
46 | unsigned int reserved[256]; /* not used */ | 40 | /* -------------------- IOCTL Peak/RMS Meters -------------------- */ |
47 | 41 | ||
48 | unsigned int input_rms_l[64]; | 42 | struct hdspm_peak_rms { |
49 | unsigned int playback_rms_l[64]; | 43 | uint32_t input_peaks[64]; |
50 | unsigned int output_rms_l[64]; | 44 | uint32_t playback_peaks[64]; |
51 | unsigned int xxx_rms_l[64]; /* not used */ | 45 | uint32_t output_peaks[64]; |
52 | 46 | ||
53 | unsigned int input_rms_h[64]; | 47 | uint64_t input_rms[64]; |
54 | unsigned int playback_rms_h[64]; | 48 | uint64_t playback_rms[64]; |
55 | unsigned int output_rms_h[64]; | 49 | uint64_t output_rms[64]; |
56 | unsigned int xxx_rms_h[64]; /* not used */ | ||
57 | }; | ||
58 | 50 | ||
59 | struct hdspm_peak_rms_ioctl { | 51 | uint8_t speed; /* enum {ss, ds, qs} */ |
60 | struct hdspm_peak_rms *peak; | 52 | int status2; |
61 | }; | 53 | }; |
62 | 54 | ||
63 | /* use indirect access due to the limit of ioctl bit size */ | ||
64 | #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \ | 55 | #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \ |
65 | _IOR('H', 0x40, struct hdspm_peak_rms_ioctl) | 56 | _IOR('H', 0x42, struct hdspm_peak_rms) |
66 | 57 | ||
67 | /* ------------ CONFIG block IOCTL ---------------------- */ | 58 | /* ------------ CONFIG block IOCTL ---------------------- */ |
68 | 59 | ||
69 | struct hdspm_config_info { | 60 | struct hdspm_config { |
70 | unsigned char pref_sync_ref; | 61 | unsigned char pref_sync_ref; |
71 | unsigned char wordclock_sync_check; | 62 | unsigned char wordclock_sync_check; |
72 | unsigned char madi_sync_check; | 63 | unsigned char madi_sync_check; |
@@ -80,18 +71,121 @@ struct hdspm_config_info { | |||
80 | unsigned int analog_out; | 71 | unsigned int analog_out; |
81 | }; | 72 | }; |
82 | 73 | ||
83 | #define SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO \ | 74 | #define SNDRV_HDSPM_IOCTL_GET_CONFIG \ |
84 | _IOR('H', 0x41, struct hdspm_config_info) | 75 | _IOR('H', 0x41, struct hdspm_config) |
76 | |||
77 | /** | ||
78 | * If there's a TCO (TimeCode Option) board installed, | ||
79 | * there are further options and status data available. | ||
80 | * The hdspm_ltc structure contains the current SMPTE | ||
81 | * timecode and some status information and can be | ||
82 | * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the | ||
83 | * hdspm_status struct. | ||
84 | **/ | ||
85 | |||
86 | enum hdspm_ltc_format { | ||
87 | format_invalid, | ||
88 | fps_24, | ||
89 | fps_25, | ||
90 | fps_2997, | ||
91 | fps_30 | ||
92 | }; | ||
93 | |||
94 | enum hdspm_ltc_frame { | ||
95 | frame_invalid, | ||
96 | drop_frame, | ||
97 | full_frame | ||
98 | }; | ||
99 | |||
100 | enum hdspm_ltc_input_format { | ||
101 | ntsc, | ||
102 | pal, | ||
103 | no_video | ||
104 | }; | ||
105 | |||
106 | struct hdspm_ltc { | ||
107 | unsigned int ltc; | ||
85 | 108 | ||
109 | enum hdspm_ltc_format format; | ||
110 | enum hdspm_ltc_frame frame; | ||
111 | enum hdspm_ltc_input_format input_format; | ||
112 | }; | ||
113 | |||
114 | #define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_mixer_ioctl) | ||
115 | |||
116 | /** | ||
117 | * The status data reflects the device's current state | ||
118 | * as determined by the card's configuration and | ||
119 | * connection status. | ||
120 | **/ | ||
121 | |||
122 | enum hdspm_sync { | ||
123 | hdspm_sync_no_lock = 0, | ||
124 | hdspm_sync_lock = 1, | ||
125 | hdspm_sync_sync = 2 | ||
126 | }; | ||
86 | 127 | ||
87 | /* get Soundcard Version */ | 128 | enum hdspm_madi_input { |
129 | hdspm_input_optical = 0, | ||
130 | hdspm_input_coax = 1 | ||
131 | }; | ||
132 | |||
133 | enum hdspm_madi_channel_format { | ||
134 | hdspm_format_ch_64 = 0, | ||
135 | hdspm_format_ch_56 = 1 | ||
136 | }; | ||
137 | |||
138 | enum hdspm_madi_frame_format { | ||
139 | hdspm_frame_48 = 0, | ||
140 | hdspm_frame_96 = 1 | ||
141 | }; | ||
142 | |||
143 | enum hdspm_syncsource { | ||
144 | syncsource_wc = 0, | ||
145 | syncsource_madi = 1, | ||
146 | syncsource_tco = 2, | ||
147 | syncsource_sync = 3, | ||
148 | syncsource_none = 4 | ||
149 | }; | ||
150 | |||
151 | struct hdspm_status { | ||
152 | uint8_t card_type; /* enum hdspm_io_type */ | ||
153 | enum hdspm_syncsource autosync_source; | ||
154 | |||
155 | uint64_t card_clock; | ||
156 | uint32_t master_period; | ||
157 | |||
158 | union { | ||
159 | struct { | ||
160 | uint8_t sync_wc; /* enum hdspm_sync */ | ||
161 | uint8_t sync_madi; /* enum hdspm_sync */ | ||
162 | uint8_t sync_tco; /* enum hdspm_sync */ | ||
163 | uint8_t sync_in; /* enum hdspm_sync */ | ||
164 | uint8_t madi_input; /* enum hdspm_madi_input */ | ||
165 | uint8_t channel_format; /* enum hdspm_madi_channel_format */ | ||
166 | uint8_t frame_format; /* enum hdspm_madi_frame_format */ | ||
167 | } madi; | ||
168 | } card_specific; | ||
169 | }; | ||
170 | |||
171 | #define SNDRV_HDSPM_IOCTL_GET_STATUS \ | ||
172 | _IOR('H', 0x47, struct hdspm_status) | ||
173 | |||
174 | /** | ||
175 | * Get information about the card and its add-ons. | ||
176 | **/ | ||
177 | |||
178 | #define HDSPM_ADDON_TCO 1 | ||
88 | 179 | ||
89 | struct hdspm_version { | 180 | struct hdspm_version { |
181 | uint8_t card_type; /* enum hdspm_io_type */ | ||
182 | char cardname[20]; | ||
183 | unsigned int serial; | ||
90 | unsigned short firmware_rev; | 184 | unsigned short firmware_rev; |
185 | int addons; | ||
91 | }; | 186 | }; |
92 | 187 | ||
93 | #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdspm_version) | 188 | #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version) |
94 | |||
95 | 189 | ||
96 | /* ------------- get Matrix Mixer IOCTL --------------- */ | 190 | /* ------------- get Matrix Mixer IOCTL --------------- */ |
97 | 191 | ||
@@ -103,7 +197,7 @@ struct hdspm_version { | |||
103 | /* equivalent to hardware definition, maybe for future feature of mmap of | 197 | /* equivalent to hardware definition, maybe for future feature of mmap of |
104 | * them | 198 | * them |
105 | */ | 199 | */ |
106 | /* each of 64 outputs has 64 infader and 64 outfader: | 200 | /* each of 64 outputs has 64 infader and 64 outfader: |
107 | Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */ | 201 | Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */ |
108 | 202 | ||
109 | #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS | 203 | #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS |
@@ -131,4 +225,5 @@ typedef struct hdspm_version hdspm_version_t; | |||
131 | typedef struct hdspm_channelfader snd_hdspm_channelfader_t; | 225 | typedef struct hdspm_channelfader snd_hdspm_channelfader_t; |
132 | typedef struct hdspm_mixer hdspm_mixer_t; | 226 | typedef struct hdspm_mixer hdspm_mixer_t; |
133 | 227 | ||
134 | #endif /* __SOUND_HDSPM_H */ | 228 | |
229 | #endif | ||
diff --git a/include/sound/mixer_oss.h b/include/sound/mixer_oss.h index 51fbcb4a277a..13cb0b430a1b 100644 --- a/include/sound/mixer_oss.h +++ b/include/sound/mixer_oss.h | |||
@@ -73,6 +73,9 @@ struct snd_mixer_oss_file { | |||
73 | struct snd_mixer_oss *mixer; | 73 | struct snd_mixer_oss *mixer; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | int snd_mixer_oss_ioctl_card(struct snd_card *card, | ||
77 | unsigned int cmd, unsigned long arg); | ||
78 | |||
76 | #endif /* CONFIG_SND_MIXER_OSS */ | 79 | #endif /* CONFIG_SND_MIXER_OSS */ |
77 | 80 | ||
78 | #endif /* __SOUND_MIXER_OSS_H */ | 81 | #endif /* __SOUND_MIXER_OSS_H */ |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index e731f8d71934..430a9cc045e2 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -136,48 +136,49 @@ struct snd_pcm_ops { | |||
136 | SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000) | 136 | SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000) |
137 | #define SNDRV_PCM_RATE_8000_192000 (SNDRV_PCM_RATE_8000_96000|SNDRV_PCM_RATE_176400|\ | 137 | #define SNDRV_PCM_RATE_8000_192000 (SNDRV_PCM_RATE_8000_96000|SNDRV_PCM_RATE_176400|\ |
138 | SNDRV_PCM_RATE_192000) | 138 | SNDRV_PCM_RATE_192000) |
139 | #define SNDRV_PCM_FMTBIT_S8 (1ULL << SNDRV_PCM_FORMAT_S8) | 139 | #define _SNDRV_PCM_FMTBIT(fmt) (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt) |
140 | #define SNDRV_PCM_FMTBIT_U8 (1ULL << SNDRV_PCM_FORMAT_U8) | 140 | #define SNDRV_PCM_FMTBIT_S8 _SNDRV_PCM_FMTBIT(S8) |
141 | #define SNDRV_PCM_FMTBIT_S16_LE (1ULL << SNDRV_PCM_FORMAT_S16_LE) | 141 | #define SNDRV_PCM_FMTBIT_U8 _SNDRV_PCM_FMTBIT(U8) |
142 | #define SNDRV_PCM_FMTBIT_S16_BE (1ULL << SNDRV_PCM_FORMAT_S16_BE) | 142 | #define SNDRV_PCM_FMTBIT_S16_LE _SNDRV_PCM_FMTBIT(S16_LE) |
143 | #define SNDRV_PCM_FMTBIT_U16_LE (1ULL << SNDRV_PCM_FORMAT_U16_LE) | 143 | #define SNDRV_PCM_FMTBIT_S16_BE _SNDRV_PCM_FMTBIT(S16_BE) |
144 | #define SNDRV_PCM_FMTBIT_U16_BE (1ULL << SNDRV_PCM_FORMAT_U16_BE) | 144 | #define SNDRV_PCM_FMTBIT_U16_LE _SNDRV_PCM_FMTBIT(U16_LE) |
145 | #define SNDRV_PCM_FMTBIT_S24_LE (1ULL << SNDRV_PCM_FORMAT_S24_LE) | 145 | #define SNDRV_PCM_FMTBIT_U16_BE _SNDRV_PCM_FMTBIT(U16_BE) |
146 | #define SNDRV_PCM_FMTBIT_S24_BE (1ULL << SNDRV_PCM_FORMAT_S24_BE) | 146 | #define SNDRV_PCM_FMTBIT_S24_LE _SNDRV_PCM_FMTBIT(S24_LE) |
147 | #define SNDRV_PCM_FMTBIT_U24_LE (1ULL << SNDRV_PCM_FORMAT_U24_LE) | 147 | #define SNDRV_PCM_FMTBIT_S24_BE _SNDRV_PCM_FMTBIT(S24_BE) |
148 | #define SNDRV_PCM_FMTBIT_U24_BE (1ULL << SNDRV_PCM_FORMAT_U24_BE) | 148 | #define SNDRV_PCM_FMTBIT_U24_LE _SNDRV_PCM_FMTBIT(U24_LE) |
149 | #define SNDRV_PCM_FMTBIT_S32_LE (1ULL << SNDRV_PCM_FORMAT_S32_LE) | 149 | #define SNDRV_PCM_FMTBIT_U24_BE _SNDRV_PCM_FMTBIT(U24_BE) |
150 | #define SNDRV_PCM_FMTBIT_S32_BE (1ULL << SNDRV_PCM_FORMAT_S32_BE) | 150 | #define SNDRV_PCM_FMTBIT_S32_LE _SNDRV_PCM_FMTBIT(S32_LE) |
151 | #define SNDRV_PCM_FMTBIT_U32_LE (1ULL << SNDRV_PCM_FORMAT_U32_LE) | 151 | #define SNDRV_PCM_FMTBIT_S32_BE _SNDRV_PCM_FMTBIT(S32_BE) |
152 | #define SNDRV_PCM_FMTBIT_U32_BE (1ULL << SNDRV_PCM_FORMAT_U32_BE) | 152 | #define SNDRV_PCM_FMTBIT_U32_LE _SNDRV_PCM_FMTBIT(U32_LE) |
153 | #define SNDRV_PCM_FMTBIT_FLOAT_LE (1ULL << SNDRV_PCM_FORMAT_FLOAT_LE) | 153 | #define SNDRV_PCM_FMTBIT_U32_BE _SNDRV_PCM_FMTBIT(U32_BE) |
154 | #define SNDRV_PCM_FMTBIT_FLOAT_BE (1ULL << SNDRV_PCM_FORMAT_FLOAT_BE) | 154 | #define SNDRV_PCM_FMTBIT_FLOAT_LE _SNDRV_PCM_FMTBIT(FLOAT_LE) |
155 | #define SNDRV_PCM_FMTBIT_FLOAT64_LE (1ULL << SNDRV_PCM_FORMAT_FLOAT64_LE) | 155 | #define SNDRV_PCM_FMTBIT_FLOAT_BE _SNDRV_PCM_FMTBIT(FLOAT_BE) |
156 | #define SNDRV_PCM_FMTBIT_FLOAT64_BE (1ULL << SNDRV_PCM_FORMAT_FLOAT64_BE) | 156 | #define SNDRV_PCM_FMTBIT_FLOAT64_LE _SNDRV_PCM_FMTBIT(FLOAT64_LE) |
157 | #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE (1ULL << SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE) | 157 | #define SNDRV_PCM_FMTBIT_FLOAT64_BE _SNDRV_PCM_FMTBIT(FLOAT64_BE) |
158 | #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE (1ULL << SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE) | 158 | #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE _SNDRV_PCM_FMTBIT(IEC958_SUBFRAME_LE) |
159 | #define SNDRV_PCM_FMTBIT_MU_LAW (1ULL << SNDRV_PCM_FORMAT_MU_LAW) | 159 | #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE _SNDRV_PCM_FMTBIT(IEC958_SUBFRAME_BE) |
160 | #define SNDRV_PCM_FMTBIT_A_LAW (1ULL << SNDRV_PCM_FORMAT_A_LAW) | 160 | #define SNDRV_PCM_FMTBIT_MU_LAW _SNDRV_PCM_FMTBIT(MU_LAW) |
161 | #define SNDRV_PCM_FMTBIT_IMA_ADPCM (1ULL << SNDRV_PCM_FORMAT_IMA_ADPCM) | 161 | #define SNDRV_PCM_FMTBIT_A_LAW _SNDRV_PCM_FMTBIT(A_LAW) |
162 | #define SNDRV_PCM_FMTBIT_MPEG (1ULL << SNDRV_PCM_FORMAT_MPEG) | 162 | #define SNDRV_PCM_FMTBIT_IMA_ADPCM _SNDRV_PCM_FMTBIT(IMA_ADPCM) |
163 | #define SNDRV_PCM_FMTBIT_GSM (1ULL << SNDRV_PCM_FORMAT_GSM) | 163 | #define SNDRV_PCM_FMTBIT_MPEG _SNDRV_PCM_FMTBIT(MPEG) |
164 | #define SNDRV_PCM_FMTBIT_SPECIAL (1ULL << SNDRV_PCM_FORMAT_SPECIAL) | 164 | #define SNDRV_PCM_FMTBIT_GSM _SNDRV_PCM_FMTBIT(GSM) |
165 | #define SNDRV_PCM_FMTBIT_S24_3LE (1ULL << SNDRV_PCM_FORMAT_S24_3LE) | 165 | #define SNDRV_PCM_FMTBIT_SPECIAL _SNDRV_PCM_FMTBIT(SPECIAL) |
166 | #define SNDRV_PCM_FMTBIT_U24_3LE (1ULL << SNDRV_PCM_FORMAT_U24_3LE) | 166 | #define SNDRV_PCM_FMTBIT_S24_3LE _SNDRV_PCM_FMTBIT(S24_3LE) |
167 | #define SNDRV_PCM_FMTBIT_S24_3BE (1ULL << SNDRV_PCM_FORMAT_S24_3BE) | 167 | #define SNDRV_PCM_FMTBIT_U24_3LE _SNDRV_PCM_FMTBIT(U24_3LE) |
168 | #define SNDRV_PCM_FMTBIT_U24_3BE (1ULL << SNDRV_PCM_FORMAT_U24_3BE) | 168 | #define SNDRV_PCM_FMTBIT_S24_3BE _SNDRV_PCM_FMTBIT(S24_3BE) |
169 | #define SNDRV_PCM_FMTBIT_S20_3LE (1ULL << SNDRV_PCM_FORMAT_S20_3LE) | 169 | #define SNDRV_PCM_FMTBIT_U24_3BE _SNDRV_PCM_FMTBIT(U24_3BE) |
170 | #define SNDRV_PCM_FMTBIT_U20_3LE (1ULL << SNDRV_PCM_FORMAT_U20_3LE) | 170 | #define SNDRV_PCM_FMTBIT_S20_3LE _SNDRV_PCM_FMTBIT(S20_3LE) |
171 | #define SNDRV_PCM_FMTBIT_S20_3BE (1ULL << SNDRV_PCM_FORMAT_S20_3BE) | 171 | #define SNDRV_PCM_FMTBIT_U20_3LE _SNDRV_PCM_FMTBIT(U20_3LE) |
172 | #define SNDRV_PCM_FMTBIT_U20_3BE (1ULL << SNDRV_PCM_FORMAT_U20_3BE) | 172 | #define SNDRV_PCM_FMTBIT_S20_3BE _SNDRV_PCM_FMTBIT(S20_3BE) |
173 | #define SNDRV_PCM_FMTBIT_S18_3LE (1ULL << SNDRV_PCM_FORMAT_S18_3LE) | 173 | #define SNDRV_PCM_FMTBIT_U20_3BE _SNDRV_PCM_FMTBIT(U20_3BE) |
174 | #define SNDRV_PCM_FMTBIT_U18_3LE (1ULL << SNDRV_PCM_FORMAT_U18_3LE) | 174 | #define SNDRV_PCM_FMTBIT_S18_3LE _SNDRV_PCM_FMTBIT(S18_3LE) |
175 | #define SNDRV_PCM_FMTBIT_S18_3BE (1ULL << SNDRV_PCM_FORMAT_S18_3BE) | 175 | #define SNDRV_PCM_FMTBIT_U18_3LE _SNDRV_PCM_FMTBIT(U18_3LE) |
176 | #define SNDRV_PCM_FMTBIT_U18_3BE (1ULL << SNDRV_PCM_FORMAT_U18_3BE) | 176 | #define SNDRV_PCM_FMTBIT_S18_3BE _SNDRV_PCM_FMTBIT(S18_3BE) |
177 | #define SNDRV_PCM_FMTBIT_G723_24 (1ULL << SNDRV_PCM_FORMAT_G723_24) | 177 | #define SNDRV_PCM_FMTBIT_U18_3BE _SNDRV_PCM_FMTBIT(U18_3BE) |
178 | #define SNDRV_PCM_FMTBIT_G723_24_1B (1ULL << SNDRV_PCM_FORMAT_G723_24_1B) | 178 | #define SNDRV_PCM_FMTBIT_G723_24 _SNDRV_PCM_FMTBIT(G723_24) |
179 | #define SNDRV_PCM_FMTBIT_G723_40 (1ULL << SNDRV_PCM_FORMAT_G723_40) | 179 | #define SNDRV_PCM_FMTBIT_G723_24_1B _SNDRV_PCM_FMTBIT(G723_24_1B) |
180 | #define SNDRV_PCM_FMTBIT_G723_40_1B (1ULL << SNDRV_PCM_FORMAT_G723_40_1B) | 180 | #define SNDRV_PCM_FMTBIT_G723_40 _SNDRV_PCM_FMTBIT(G723_40) |
181 | #define SNDRV_PCM_FMTBIT_G723_40_1B _SNDRV_PCM_FMTBIT(G723_40_1B) | ||
181 | 182 | ||
182 | #ifdef SNDRV_LITTLE_ENDIAN | 183 | #ifdef SNDRV_LITTLE_ENDIAN |
183 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE | 184 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE |
@@ -490,7 +491,7 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream, | |||
490 | int snd_pcm_status(struct snd_pcm_substream *substream, | 491 | int snd_pcm_status(struct snd_pcm_substream *substream, |
491 | struct snd_pcm_status *status); | 492 | struct snd_pcm_status *status); |
492 | int snd_pcm_start(struct snd_pcm_substream *substream); | 493 | int snd_pcm_start(struct snd_pcm_substream *substream); |
493 | int snd_pcm_stop(struct snd_pcm_substream *substream, int status); | 494 | int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status); |
494 | int snd_pcm_drain_done(struct snd_pcm_substream *substream); | 495 | int snd_pcm_drain_done(struct snd_pcm_substream *substream); |
495 | #ifdef CONFIG_PM | 496 | #ifdef CONFIG_PM |
496 | int snd_pcm_suspend(struct snd_pcm_substream *substream); | 497 | int snd_pcm_suspend(struct snd_pcm_substream *substream); |
@@ -748,8 +749,8 @@ static inline const struct snd_interval *hw_param_interval_c(const struct snd_pc | |||
748 | return ¶ms->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; | 749 | return ¶ms->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; |
749 | } | 750 | } |
750 | 751 | ||
751 | #define params_access(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS)) | 752 | #define params_access(p) ((__force snd_pcm_access_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS))) |
752 | #define params_format(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_FORMAT)) | 753 | #define params_format(p) ((__force snd_pcm_format_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_FORMAT))) |
753 | #define params_subformat(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) | 754 | #define params_subformat(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) |
754 | #define params_channels(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min | 755 | #define params_channels(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min |
755 | #define params_rate(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_RATE)->min | 756 | #define params_rate(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_RATE)->min |
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h index d79894192ae3..9a155f9d0a12 100644 --- a/include/sound/sh_fsi.h +++ b/include/sound/sh_fsi.h | |||
@@ -15,67 +15,29 @@ | |||
15 | #define FSI_PORT_A 0 | 15 | #define FSI_PORT_A 0 |
16 | #define FSI_PORT_B 1 | 16 | #define FSI_PORT_B 1 |
17 | 17 | ||
18 | /* flags format | ||
19 | |||
20 | * 0xABCDEEFF | ||
21 | * | ||
22 | * A: channel size for TDM (input) | ||
23 | * B: channel size for TDM (ooutput) | ||
24 | * C: inversion | ||
25 | * D: mode | ||
26 | * E: input format | ||
27 | * F: output format | ||
28 | */ | ||
29 | |||
30 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
31 | #include <sound/soc.h> | 19 | #include <sound/soc.h> |
32 | 20 | ||
33 | /* TDM channel */ | 21 | /* |
34 | #define SH_FSI_SET_CH_I(x) ((x & 0xF) << 28) | 22 | * flags format |
35 | #define SH_FSI_SET_CH_O(x) ((x & 0xF) << 24) | 23 | * |
36 | 24 | * 0x000000BA | |
37 | #define SH_FSI_CH_IMASK 0xF0000000 | 25 | * |
38 | #define SH_FSI_CH_OMASK 0x0F000000 | 26 | * A: inversion |
39 | #define SH_FSI_GET_CH_I(x) ((x & SH_FSI_CH_IMASK) >> 28) | 27 | * B: format mode |
40 | #define SH_FSI_GET_CH_O(x) ((x & SH_FSI_CH_OMASK) >> 24) | 28 | */ |
41 | |||
42 | /* clock inversion */ | ||
43 | #define SH_FSI_INVERSION_MASK 0x00F00000 | ||
44 | #define SH_FSI_LRM_INV (1 << 20) | ||
45 | #define SH_FSI_BRM_INV (1 << 21) | ||
46 | #define SH_FSI_LRS_INV (1 << 22) | ||
47 | #define SH_FSI_BRS_INV (1 << 23) | ||
48 | |||
49 | /* mode */ | ||
50 | #define SH_FSI_MODE_MASK 0x000F0000 | ||
51 | #define SH_FSI_IN_SLAVE_MODE (1 << 16) /* default master mode */ | ||
52 | #define SH_FSI_OUT_SLAVE_MODE (1 << 17) /* default master mode */ | ||
53 | |||
54 | /* DI format */ | ||
55 | #define SH_FSI_FMT_MASK 0x000000FF | ||
56 | #define SH_FSI_IFMT(x) (((SH_FSI_FMT_ ## x) & SH_FSI_FMT_MASK) << 8) | ||
57 | #define SH_FSI_OFMT(x) (((SH_FSI_FMT_ ## x) & SH_FSI_FMT_MASK) << 0) | ||
58 | #define SH_FSI_GET_IFMT(x) ((x >> 8) & SH_FSI_FMT_MASK) | ||
59 | #define SH_FSI_GET_OFMT(x) ((x >> 0) & SH_FSI_FMT_MASK) | ||
60 | |||
61 | #define SH_FSI_FMT_MONO 0 | ||
62 | #define SH_FSI_FMT_MONO_DELAY 1 | ||
63 | #define SH_FSI_FMT_PCM 2 | ||
64 | #define SH_FSI_FMT_I2S 3 | ||
65 | #define SH_FSI_FMT_TDM 4 | ||
66 | #define SH_FSI_FMT_TDM_DELAY 5 | ||
67 | #define SH_FSI_FMT_SPDIF 6 | ||
68 | |||
69 | |||
70 | #define SH_FSI_IFMT_TDM_CH(x) \ | ||
71 | (SH_FSI_IFMT(TDM) | SH_FSI_SET_CH_I(x)) | ||
72 | #define SH_FSI_IFMT_TDM_DELAY_CH(x) \ | ||
73 | (SH_FSI_IFMT(TDM_DELAY) | SH_FSI_SET_CH_I(x)) | ||
74 | 29 | ||
75 | #define SH_FSI_OFMT_TDM_CH(x) \ | 30 | /* A: clock inversion */ |
76 | (SH_FSI_OFMT(TDM) | SH_FSI_SET_CH_O(x)) | 31 | #define SH_FSI_INVERSION_MASK 0x0000000F |
77 | #define SH_FSI_OFMT_TDM_DELAY_CH(x) \ | 32 | #define SH_FSI_LRM_INV (1 << 0) |
78 | (SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x)) | 33 | #define SH_FSI_BRM_INV (1 << 1) |
34 | #define SH_FSI_LRS_INV (1 << 2) | ||
35 | #define SH_FSI_BRS_INV (1 << 3) | ||
36 | |||
37 | /* B: format mode */ | ||
38 | #define SH_FSI_FMT_MASK 0x000000F0 | ||
39 | #define SH_FSI_FMT_DAI (0 << 4) | ||
40 | #define SH_FSI_FMT_SPDIF (1 << 4) | ||
79 | 41 | ||
80 | 42 | ||
81 | /* | 43 | /* |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 8031769ac485..979ed84e07d6 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -157,6 +157,18 @@ | |||
157 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 157 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ |
158 | .event = wevent, .event_flags = wflags} | 158 | .event = wevent, .event_flags = wflags} |
159 | 159 | ||
160 | /* additional sequencing control within an event type */ | ||
161 | #define SND_SOC_DAPM_PGA_S(wname, wsubseq, wreg, wshift, winvert, \ | ||
162 | wevent, wflags) \ | ||
163 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | ||
164 | .invert = winvert, .event = wevent, .event_flags = wflags, \ | ||
165 | .subseq = wsubseq} | ||
166 | #define SND_SOC_DAPM_SUPPLY_S(wname, wsubseq, wreg, wshift, winvert, wevent, \ | ||
167 | wflags) \ | ||
168 | { .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \ | ||
169 | .shift = wshift, .invert = winvert, .event = wevent, \ | ||
170 | .event_flags = wflags, .subseq = wsubseq} | ||
171 | |||
160 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ | 172 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ |
161 | #define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ | 173 | #define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ |
162 | wevent, wflags) \ | 174 | wevent, wflags) \ |
@@ -450,6 +462,7 @@ struct snd_soc_dapm_widget { | |||
450 | unsigned char ext:1; /* has external widgets */ | 462 | unsigned char ext:1; /* has external widgets */ |
451 | unsigned char force:1; /* force state */ | 463 | unsigned char force:1; /* force state */ |
452 | unsigned char ignore_suspend:1; /* kept enabled over suspend */ | 464 | unsigned char ignore_suspend:1; /* kept enabled over suspend */ |
465 | int subseq; /* sort within widget type */ | ||
453 | 466 | ||
454 | int (*power_check)(struct snd_soc_dapm_widget *w); | 467 | int (*power_check)(struct snd_soc_dapm_widget *w); |
455 | 468 | ||
@@ -487,6 +500,9 @@ struct snd_soc_dapm_context { | |||
487 | 500 | ||
488 | struct snd_soc_dapm_update *update; | 501 | struct snd_soc_dapm_update *update; |
489 | 502 | ||
503 | void (*seq_notifier)(struct snd_soc_dapm_context *, | ||
504 | enum snd_soc_dapm_type, int); | ||
505 | |||
490 | struct device *dev; /* from parent - for debug */ | 506 | struct device *dev; /* from parent - for debug */ |
491 | struct snd_soc_codec *codec; /* parent codec */ | 507 | struct snd_soc_codec *codec; /* parent codec */ |
492 | struct snd_soc_card *card; /* parent card */ | 508 | struct snd_soc_card *card; /* parent card */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 74921f20a1d8..bfa4836ea107 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -234,6 +234,7 @@ struct snd_soc_codec; | |||
234 | struct snd_soc_codec_driver; | 234 | struct snd_soc_codec_driver; |
235 | struct soc_enum; | 235 | struct soc_enum; |
236 | struct snd_soc_jack; | 236 | struct snd_soc_jack; |
237 | struct snd_soc_jack_zone; | ||
237 | struct snd_soc_jack_pin; | 238 | struct snd_soc_jack_pin; |
238 | struct snd_soc_cache_ops; | 239 | struct snd_soc_cache_ops; |
239 | #include <sound/soc-dapm.h> | 240 | #include <sound/soc-dapm.h> |
@@ -258,6 +259,16 @@ enum snd_soc_compress_type { | |||
258 | SND_SOC_RBTREE_COMPRESSION | 259 | SND_SOC_RBTREE_COMPRESSION |
259 | }; | 260 | }; |
260 | 261 | ||
262 | int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id, | ||
263 | unsigned int freq, int dir); | ||
264 | int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, | ||
265 | unsigned int freq_in, unsigned int freq_out); | ||
266 | |||
267 | int snd_soc_register_card(struct snd_soc_card *card); | ||
268 | int snd_soc_unregister_card(struct snd_soc_card *card); | ||
269 | int snd_soc_suspend(struct device *dev); | ||
270 | int snd_soc_resume(struct device *dev); | ||
271 | int snd_soc_poweroff(struct device *dev); | ||
261 | int snd_soc_register_platform(struct device *dev, | 272 | int snd_soc_register_platform(struct device *dev, |
262 | struct snd_soc_platform_driver *platform_drv); | 273 | struct snd_soc_platform_driver *platform_drv); |
263 | void snd_soc_unregister_platform(struct device *dev); | 274 | void snd_soc_unregister_platform(struct device *dev); |
@@ -265,7 +276,8 @@ int snd_soc_register_codec(struct device *dev, | |||
265 | const struct snd_soc_codec_driver *codec_drv, | 276 | const struct snd_soc_codec_driver *codec_drv, |
266 | struct snd_soc_dai_driver *dai_drv, int num_dai); | 277 | struct snd_soc_dai_driver *dai_drv, int num_dai); |
267 | void snd_soc_unregister_codec(struct device *dev); | 278 | void snd_soc_unregister_codec(struct device *dev); |
268 | int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, int reg); | 279 | int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, |
280 | unsigned int reg); | ||
269 | int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | 281 | int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, |
270 | int addr_bits, int data_bits, | 282 | int addr_bits, int data_bits, |
271 | enum snd_soc_control_type control); | 283 | enum snd_soc_control_type control); |
@@ -276,6 +288,10 @@ int snd_soc_cache_write(struct snd_soc_codec *codec, | |||
276 | unsigned int reg, unsigned int value); | 288 | unsigned int reg, unsigned int value); |
277 | int snd_soc_cache_read(struct snd_soc_codec *codec, | 289 | int snd_soc_cache_read(struct snd_soc_codec *codec, |
278 | unsigned int reg, unsigned int *value); | 290 | unsigned int reg, unsigned int *value); |
291 | int snd_soc_default_volatile_register(struct snd_soc_codec *codec, | ||
292 | unsigned int reg); | ||
293 | int snd_soc_default_readable_register(struct snd_soc_codec *codec, | ||
294 | unsigned int reg); | ||
279 | 295 | ||
280 | /* Utility functions to get clock rates from various things */ | 296 | /* Utility functions to get clock rates from various things */ |
281 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); | 297 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); |
@@ -297,6 +313,9 @@ void snd_soc_jack_notifier_register(struct snd_soc_jack *jack, | |||
297 | struct notifier_block *nb); | 313 | struct notifier_block *nb); |
298 | void snd_soc_jack_notifier_unregister(struct snd_soc_jack *jack, | 314 | void snd_soc_jack_notifier_unregister(struct snd_soc_jack *jack, |
299 | struct notifier_block *nb); | 315 | struct notifier_block *nb); |
316 | int snd_soc_jack_add_zones(struct snd_soc_jack *jack, int count, | ||
317 | struct snd_soc_jack_zone *zones); | ||
318 | int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage); | ||
300 | #ifdef CONFIG_GPIOLIB | 319 | #ifdef CONFIG_GPIOLIB |
301 | int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | 320 | int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, |
302 | struct snd_soc_jack_gpio *gpios); | 321 | struct snd_soc_jack_gpio *gpios); |
@@ -321,7 +340,8 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | |||
321 | *Controls | 340 | *Controls |
322 | */ | 341 | */ |
323 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, | 342 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, |
324 | void *data, char *long_name); | 343 | void *data, char *long_name, |
344 | const char *prefix); | ||
325 | int snd_soc_add_controls(struct snd_soc_codec *codec, | 345 | int snd_soc_add_controls(struct snd_soc_codec *codec, |
326 | const struct snd_kcontrol_new *controls, int num_controls); | 346 | const struct snd_kcontrol_new *controls, int num_controls); |
327 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, | 347 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, |
@@ -367,6 +387,22 @@ int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol, | |||
367 | struct snd_ctl_elem_value *ucontrol); | 387 | struct snd_ctl_elem_value *ucontrol); |
368 | 388 | ||
369 | /** | 389 | /** |
390 | * struct snd_soc_reg_access - Describes whether a given register is | ||
391 | * readable, writable or volatile. | ||
392 | * | ||
393 | * @reg: the register number | ||
394 | * @read: whether this register is readable | ||
395 | * @write: whether this register is writable | ||
396 | * @vol: whether this register is volatile | ||
397 | */ | ||
398 | struct snd_soc_reg_access { | ||
399 | u16 reg; | ||
400 | u16 read; | ||
401 | u16 write; | ||
402 | u16 vol; | ||
403 | }; | ||
404 | |||
405 | /** | ||
370 | * struct snd_soc_jack_pin - Describes a pin to update based on jack detection | 406 | * struct snd_soc_jack_pin - Describes a pin to update based on jack detection |
371 | * | 407 | * |
372 | * @pin: name of the pin to update | 408 | * @pin: name of the pin to update |
@@ -381,6 +417,24 @@ struct snd_soc_jack_pin { | |||
381 | }; | 417 | }; |
382 | 418 | ||
383 | /** | 419 | /** |
420 | * struct snd_soc_jack_zone - Describes voltage zones of jack detection | ||
421 | * | ||
422 | * @min_mv: start voltage in mv | ||
423 | * @max_mv: end voltage in mv | ||
424 | * @jack_type: type of jack that is expected for this voltage | ||
425 | * @debounce_time: debounce_time for jack, codec driver should wait for this | ||
426 | * duration before reading the adc for voltages | ||
427 | * @:list: list container | ||
428 | */ | ||
429 | struct snd_soc_jack_zone { | ||
430 | unsigned int min_mv; | ||
431 | unsigned int max_mv; | ||
432 | unsigned int jack_type; | ||
433 | unsigned int debounce_time; | ||
434 | struct list_head list; | ||
435 | }; | ||
436 | |||
437 | /** | ||
384 | * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection | 438 | * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection |
385 | * | 439 | * |
386 | * @gpio: gpio number | 440 | * @gpio: gpio number |
@@ -388,6 +442,10 @@ struct snd_soc_jack_pin { | |||
388 | * @report: value to report when jack detected | 442 | * @report: value to report when jack detected |
389 | * @invert: report presence in low state | 443 | * @invert: report presence in low state |
390 | * @debouce_time: debouce time in ms | 444 | * @debouce_time: debouce time in ms |
445 | * @wake: enable as wake source | ||
446 | * @jack_status_check: callback function which overrides the detection | ||
447 | * to provide more complex checks (eg, reading an | ||
448 | * ADC). | ||
391 | */ | 449 | */ |
392 | #ifdef CONFIG_GPIOLIB | 450 | #ifdef CONFIG_GPIOLIB |
393 | struct snd_soc_jack_gpio { | 451 | struct snd_soc_jack_gpio { |
@@ -396,6 +454,8 @@ struct snd_soc_jack_gpio { | |||
396 | int report; | 454 | int report; |
397 | int invert; | 455 | int invert; |
398 | int debounce_time; | 456 | int debounce_time; |
457 | bool wake; | ||
458 | |||
399 | struct snd_soc_jack *jack; | 459 | struct snd_soc_jack *jack; |
400 | struct delayed_work work; | 460 | struct delayed_work work; |
401 | 461 | ||
@@ -409,6 +469,7 @@ struct snd_soc_jack { | |||
409 | struct list_head pins; | 469 | struct list_head pins; |
410 | int status; | 470 | int status; |
411 | struct blocking_notifier_head notifier; | 471 | struct blocking_notifier_head notifier; |
472 | struct list_head jack_zones; | ||
412 | }; | 473 | }; |
413 | 474 | ||
414 | /* SoC PCM stream information */ | 475 | /* SoC PCM stream information */ |
@@ -459,18 +520,22 @@ struct snd_soc_codec { | |||
459 | struct list_head card_list; | 520 | struct list_head card_list; |
460 | int num_dai; | 521 | int num_dai; |
461 | enum snd_soc_compress_type compress_type; | 522 | enum snd_soc_compress_type compress_type; |
523 | size_t reg_size; /* reg_cache_size * reg_word_size */ | ||
524 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); | ||
525 | int (*readable_register)(struct snd_soc_codec *, unsigned int); | ||
462 | 526 | ||
463 | /* runtime */ | 527 | /* runtime */ |
464 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | 528 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ |
465 | unsigned int active; | 529 | unsigned int active; |
466 | unsigned int cache_only:1; /* Suppress writes to hardware */ | 530 | unsigned int cache_bypass:1; /* Suppress access to the cache */ |
467 | unsigned int cache_sync:1; /* Cache needs to be synced to hardware */ | ||
468 | unsigned int suspended:1; /* Codec is in suspend PM state */ | 531 | unsigned int suspended:1; /* Codec is in suspend PM state */ |
469 | unsigned int probed:1; /* Codec has been probed */ | 532 | unsigned int probed:1; /* Codec has been probed */ |
470 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ | 533 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ |
471 | unsigned int ac97_created:1; /* Codec has been created by SoC */ | 534 | unsigned int ac97_created:1; /* Codec has been created by SoC */ |
472 | unsigned int sysfs_registered:1; /* codec has been sysfs registered */ | 535 | unsigned int sysfs_registered:1; /* codec has been sysfs registered */ |
473 | unsigned int cache_init:1; /* codec cache has been initialized */ | 536 | unsigned int cache_init:1; /* codec cache has been initialized */ |
537 | u32 cache_only; /* Suppress writes to hardware */ | ||
538 | u32 cache_sync; /* Cache needs to be synced to hardware */ | ||
474 | 539 | ||
475 | /* codec IO */ | 540 | /* codec IO */ |
476 | void *control_data; /* codec control (i2c/3wire) data */ | 541 | void *control_data; /* codec control (i2c/3wire) data */ |
@@ -503,22 +568,39 @@ struct snd_soc_codec_driver { | |||
503 | pm_message_t state); | 568 | pm_message_t state); |
504 | int (*resume)(struct snd_soc_codec *); | 569 | int (*resume)(struct snd_soc_codec *); |
505 | 570 | ||
571 | /* Default DAPM setup, added after probe() is run */ | ||
572 | const struct snd_soc_dapm_widget *dapm_widgets; | ||
573 | int num_dapm_widgets; | ||
574 | const struct snd_soc_dapm_route *dapm_routes; | ||
575 | int num_dapm_routes; | ||
576 | |||
577 | /* codec wide operations */ | ||
578 | int (*set_sysclk)(struct snd_soc_codec *codec, | ||
579 | int clk_id, unsigned int freq, int dir); | ||
580 | int (*set_pll)(struct snd_soc_codec *codec, int pll_id, int source, | ||
581 | unsigned int freq_in, unsigned int freq_out); | ||
582 | |||
506 | /* codec IO */ | 583 | /* codec IO */ |
507 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); | 584 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); |
508 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); | 585 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); |
509 | int (*display_register)(struct snd_soc_codec *, char *, | 586 | int (*display_register)(struct snd_soc_codec *, char *, |
510 | size_t, unsigned int); | 587 | size_t, unsigned int); |
511 | int (*volatile_register)(unsigned int); | 588 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); |
512 | int (*readable_register)(unsigned int); | 589 | int (*readable_register)(struct snd_soc_codec *, unsigned int); |
513 | short reg_cache_size; | 590 | short reg_cache_size; |
514 | short reg_cache_step; | 591 | short reg_cache_step; |
515 | short reg_word_size; | 592 | short reg_word_size; |
516 | const void *reg_cache_default; | 593 | const void *reg_cache_default; |
594 | short reg_access_size; | ||
595 | const struct snd_soc_reg_access *reg_access_default; | ||
517 | enum snd_soc_compress_type compress_type; | 596 | enum snd_soc_compress_type compress_type; |
518 | 597 | ||
519 | /* codec bias level */ | 598 | /* codec bias level */ |
520 | int (*set_bias_level)(struct snd_soc_codec *, | 599 | int (*set_bias_level)(struct snd_soc_codec *, |
521 | enum snd_soc_bias_level level); | 600 | enum snd_soc_bias_level level); |
601 | |||
602 | void (*seq_notifier)(struct snd_soc_dapm_context *, | ||
603 | enum snd_soc_dapm_type, int); | ||
522 | }; | 604 | }; |
523 | 605 | ||
524 | /* SoC platform interface */ | 606 | /* SoC platform interface */ |
@@ -617,15 +699,16 @@ struct snd_soc_card { | |||
617 | 699 | ||
618 | bool instantiated; | 700 | bool instantiated; |
619 | 701 | ||
620 | int (*probe)(struct platform_device *pdev); | 702 | int (*probe)(struct snd_soc_card *card); |
621 | int (*remove)(struct platform_device *pdev); | 703 | int (*late_probe)(struct snd_soc_card *card); |
704 | int (*remove)(struct snd_soc_card *card); | ||
622 | 705 | ||
623 | /* the pre and post PM functions are used to do any PM work before and | 706 | /* the pre and post PM functions are used to do any PM work before and |
624 | * after the codec and DAI's do any PM work. */ | 707 | * after the codec and DAI's do any PM work. */ |
625 | int (*suspend_pre)(struct platform_device *pdev, pm_message_t state); | 708 | int (*suspend_pre)(struct snd_soc_card *card); |
626 | int (*suspend_post)(struct platform_device *pdev, pm_message_t state); | 709 | int (*suspend_post)(struct snd_soc_card *card); |
627 | int (*resume_pre)(struct platform_device *pdev); | 710 | int (*resume_pre)(struct snd_soc_card *card); |
628 | int (*resume_post)(struct platform_device *pdev); | 711 | int (*resume_post)(struct snd_soc_card *card); |
629 | 712 | ||
630 | /* callbacks */ | 713 | /* callbacks */ |
631 | int (*set_bias_level)(struct snd_soc_card *, | 714 | int (*set_bias_level)(struct snd_soc_card *, |
@@ -654,6 +737,14 @@ struct snd_soc_card { | |||
654 | struct snd_soc_pcm_runtime *rtd_aux; | 737 | struct snd_soc_pcm_runtime *rtd_aux; |
655 | int num_aux_rtd; | 738 | int num_aux_rtd; |
656 | 739 | ||
740 | /* | ||
741 | * Card-specific routes and widgets. | ||
742 | */ | ||
743 | struct snd_soc_dapm_widget *dapm_widgets; | ||
744 | int num_dapm_widgets; | ||
745 | struct snd_soc_dapm_route *dapm_routes; | ||
746 | int num_dapm_routes; | ||
747 | |||
657 | struct work_struct deferred_resume_work; | 748 | struct work_struct deferred_resume_work; |
658 | 749 | ||
659 | /* lists of probed devices belonging to this card */ | 750 | /* lists of probed devices belonging to this card */ |
@@ -665,11 +756,16 @@ struct snd_soc_card { | |||
665 | struct list_head paths; | 756 | struct list_head paths; |
666 | struct list_head dapm_list; | 757 | struct list_head dapm_list; |
667 | 758 | ||
759 | /* Generic DAPM context for the card */ | ||
760 | struct snd_soc_dapm_context dapm; | ||
761 | |||
668 | #ifdef CONFIG_DEBUG_FS | 762 | #ifdef CONFIG_DEBUG_FS |
669 | struct dentry *debugfs_card_root; | 763 | struct dentry *debugfs_card_root; |
670 | struct dentry *debugfs_pop_time; | 764 | struct dentry *debugfs_pop_time; |
671 | #endif | 765 | #endif |
672 | u32 pop_time; | 766 | u32 pop_time; |
767 | |||
768 | void *drvdata; | ||
673 | }; | 769 | }; |
674 | 770 | ||
675 | /* SoC machine DAI configuration, glues a codec and cpu DAI together */ | 771 | /* SoC machine DAI configuration, glues a codec and cpu DAI together */ |
@@ -721,6 +817,17 @@ unsigned int snd_soc_write(struct snd_soc_codec *codec, | |||
721 | 817 | ||
722 | /* device driver data */ | 818 | /* device driver data */ |
723 | 819 | ||
820 | static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, | ||
821 | void *data) | ||
822 | { | ||
823 | card->drvdata = data; | ||
824 | } | ||
825 | |||
826 | static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card) | ||
827 | { | ||
828 | return card->drvdata; | ||
829 | } | ||
830 | |||
724 | static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec, | 831 | static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec, |
725 | void *data) | 832 | void *data) |
726 | { | 833 | { |
@@ -754,6 +861,22 @@ static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) | |||
754 | return dev_get_drvdata(&rtd->dev); | 861 | return dev_get_drvdata(&rtd->dev); |
755 | } | 862 | } |
756 | 863 | ||
864 | static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) | ||
865 | { | ||
866 | INIT_LIST_HEAD(&card->dai_dev_list); | ||
867 | INIT_LIST_HEAD(&card->codec_dev_list); | ||
868 | INIT_LIST_HEAD(&card->platform_dev_list); | ||
869 | INIT_LIST_HEAD(&card->widgets); | ||
870 | INIT_LIST_HEAD(&card->paths); | ||
871 | INIT_LIST_HEAD(&card->dapm_list); | ||
872 | } | ||
873 | |||
757 | #include <sound/soc-dai.h> | 874 | #include <sound/soc-dai.h> |
758 | 875 | ||
876 | #ifdef CONFIG_DEBUG_FS | ||
877 | extern struct dentry *snd_soc_debugfs_root; | ||
878 | #endif | ||
879 | |||
880 | extern const struct dev_pm_ops snd_soc_pm_ops; | ||
881 | |||
759 | #endif | 882 | #endif |
diff --git a/include/sound/tlv320aic32x4.h b/include/sound/tlv320aic32x4.h new file mode 100644 index 000000000000..c009f70b4029 --- /dev/null +++ b/include/sound/tlv320aic32x4.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * tlv320aic32x4.h -- TLV320AIC32X4 Soc Audio driver platform data | ||
3 | * | ||
4 | * Copyright 2011 Vista Silicon S.L. | ||
5 | * | ||
6 | * Author: Javier Martin <javier.martin@vista-silicon.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef _AIC32X4_PDATA_H | ||
14 | #define _AIC32X4_PDATA_H | ||
15 | |||
16 | #define AIC32X4_PWR_MICBIAS_2075_LDOIN 0x00000001 | ||
17 | #define AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE 0x00000002 | ||
18 | #define AIC32X4_PWR_AIC32X4_LDO_ENABLE 0x00000004 | ||
19 | #define AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36 0x00000008 | ||
20 | #define AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED 0x00000010 | ||
21 | |||
22 | #define AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K 0x00000001 | ||
23 | #define AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K 0x00000002 | ||
24 | |||
25 | struct aic32x4_pdata { | ||
26 | u32 power_cfg; | ||
27 | u32 micpga_routing; | ||
28 | bool swapdacs; | ||
29 | }; | ||
30 | |||
31 | #endif | ||
diff --git a/include/sound/version.h b/include/sound/version.h index bf69a5b7e65f..8fc5321e1ecc 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.23" | 2 | #define CONFIG_SND_VERSION "1.0.24" |
3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |
diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h index 1eeebd534f7e..cf7ccb76a8de 100644 --- a/include/sound/wm8903.h +++ b/include/sound/wm8903.h | |||
@@ -33,6 +33,21 @@ | |||
33 | #define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */ | 33 | #define WM8903_MICBIAS_ENA_WIDTH 1 /* MICBIAS_ENA */ |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * WM8903_GPn_FN values | ||
37 | * | ||
38 | * See datasheets for list of valid values per pin | ||
39 | */ | ||
40 | #define WM8903_GPn_FN_GPIO_OUTPUT 0 | ||
41 | #define WM8903_GPn_FN_BCLK 1 | ||
42 | #define WM8903_GPn_FN_IRQ_OUTPT 2 | ||
43 | #define WM8903_GPn_FN_GPIO_INPUT 3 | ||
44 | #define WM8903_GPn_FN_MICBIAS_CURRENT_DETECT 4 | ||
45 | #define WM8903_GPn_FN_MICBIAS_SHORT_DETECT 5 | ||
46 | #define WM8903_GPn_FN_DMIC_LR_CLK_OUTPUT 6 | ||
47 | #define WM8903_GPn_FN_FLL_LOCK_OUTPUT 8 | ||
48 | #define WM8903_GPn_FN_FLL_CLOCK_OUTPUT 9 | ||
49 | |||
50 | /* | ||
36 | * R116 (0x74) - GPIO Control 1 | 51 | * R116 (0x74) - GPIO Control 1 |
37 | */ | 52 | */ |
38 | #define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */ | 53 | #define WM8903_GP1_FN_MASK 0x1F00 /* GP1_FN - [12:8] */ |
@@ -227,6 +242,8 @@ | |||
227 | #define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ | 242 | #define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ |
228 | #define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ | 243 | #define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ |
229 | 244 | ||
245 | #define WM8903_NUM_GPIO 5 | ||
246 | |||
230 | struct wm8903_platform_data { | 247 | struct wm8903_platform_data { |
231 | bool irq_active_low; /* Set if IRQ active low, default high */ | 248 | bool irq_active_low; /* Set if IRQ active low, default high */ |
232 | 249 | ||
@@ -239,7 +256,8 @@ struct wm8903_platform_data { | |||
239 | 256 | ||
240 | int micdet_delay; /* Delay after microphone detection (ms) */ | 257 | int micdet_delay; /* Delay after microphone detection (ms) */ |
241 | 258 | ||
242 | u32 gpio_cfg[5]; /* Default register values for GPIO pin mux */ | 259 | int gpio_base; |
260 | u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */ | ||
243 | }; | 261 | }; |
244 | 262 | ||
245 | #endif | 263 | #endif |
diff --git a/include/sound/wm9081.h b/include/sound/wm9081.h index e173ddbf6bd4..f34b0b1716d8 100644 --- a/include/sound/wm9081.h +++ b/include/sound/wm9081.h | |||
@@ -17,9 +17,12 @@ struct wm9081_retune_mobile_setting { | |||
17 | u16 config[20]; | 17 | u16 config[20]; |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct wm9081_retune_mobile_config { | 20 | struct wm9081_pdata { |
21 | struct wm9081_retune_mobile_setting *configs; | 21 | bool irq_high; /* IRQ is active high */ |
22 | int num_configs; | 22 | bool irq_cmos; /* IRQ is in CMOS mode */ |
23 | |||
24 | struct wm9081_retune_mobile_setting *retune_configs; | ||
25 | int num_retune_configs; | ||
23 | }; | 26 | }; |
24 | 27 | ||
25 | #endif | 28 | #endif |
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index 186e84db4b54..ae973d2e27a1 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h | |||
@@ -229,6 +229,31 @@ TRACE_EVENT(snd_soc_jack_notify, | |||
229 | TP_printk("jack=%s %x", __get_str(name), (int)__entry->val) | 229 | TP_printk("jack=%s %x", __get_str(name), (int)__entry->val) |
230 | ); | 230 | ); |
231 | 231 | ||
232 | TRACE_EVENT(snd_soc_cache_sync, | ||
233 | |||
234 | TP_PROTO(struct snd_soc_codec *codec, const char *type, | ||
235 | const char *status), | ||
236 | |||
237 | TP_ARGS(codec, type, status), | ||
238 | |||
239 | TP_STRUCT__entry( | ||
240 | __string( name, codec->name ) | ||
241 | __string( status, status ) | ||
242 | __string( type, type ) | ||
243 | __field( int, id ) | ||
244 | ), | ||
245 | |||
246 | TP_fast_assign( | ||
247 | __assign_str(name, codec->name); | ||
248 | __assign_str(status, status); | ||
249 | __assign_str(type, type); | ||
250 | __entry->id = codec->id; | ||
251 | ), | ||
252 | |||
253 | TP_printk("codec=%s.%d type=%s status=%s", __get_str(name), | ||
254 | (int)__entry->id, __get_str(type), __get_str(status)) | ||
255 | ); | ||
256 | |||
232 | #endif /* _TRACE_ASOC_H */ | 257 | #endif /* _TRACE_ASOC_H */ |
233 | 258 | ||
234 | /* This part must be outside protection */ | 259 | /* This part must be outside protection */ |