diff options
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-audio.c')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-audio.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c index fe6bc411d71f..cb9a7981e408 100644 --- a/drivers/media/video/cx25840/cx25840-audio.c +++ b/drivers/media/video/cx25840/cx25840-audio.c | |||
@@ -170,7 +170,7 @@ void cx25840_audio_set_path(struct i2c_client *client) | |||
170 | set_audclk_freq(client, state->audclk_freq); | 170 | set_audclk_freq(client, state->audclk_freq); |
171 | } | 171 | } |
172 | 172 | ||
173 | inline static int get_volume(struct i2c_client *client) | 173 | static int get_volume(struct i2c_client *client) |
174 | { | 174 | { |
175 | /* Volume runs +18dB to -96dB in 1/2dB steps | 175 | /* Volume runs +18dB to -96dB in 1/2dB steps |
176 | * change to fit the msp3400 -114dB to +12dB range */ | 176 | * change to fit the msp3400 -114dB to +12dB range */ |
@@ -181,7 +181,7 @@ inline static int get_volume(struct i2c_client *client) | |||
181 | return vol << 9; | 181 | return vol << 9; |
182 | } | 182 | } |
183 | 183 | ||
184 | inline static void set_volume(struct i2c_client *client, int volume) | 184 | static void set_volume(struct i2c_client *client, int volume) |
185 | { | 185 | { |
186 | /* First convert the volume to msp3400 values (0-127) */ | 186 | /* First convert the volume to msp3400 values (0-127) */ |
187 | int vol = volume >> 9; | 187 | int vol = volume >> 9; |
@@ -198,7 +198,7 @@ inline static void set_volume(struct i2c_client *client, int volume) | |||
198 | cx25840_write(client, 0x8d4, 228 - (vol * 2)); | 198 | cx25840_write(client, 0x8d4, 228 - (vol * 2)); |
199 | } | 199 | } |
200 | 200 | ||
201 | inline static int get_bass(struct i2c_client *client) | 201 | static int get_bass(struct i2c_client *client) |
202 | { | 202 | { |
203 | /* bass is 49 steps +12dB to -12dB */ | 203 | /* bass is 49 steps +12dB to -12dB */ |
204 | 204 | ||
@@ -208,13 +208,13 @@ inline static int get_bass(struct i2c_client *client) | |||
208 | return bass; | 208 | return bass; |
209 | } | 209 | } |
210 | 210 | ||
211 | inline static void set_bass(struct i2c_client *client, int bass) | 211 | static void set_bass(struct i2c_client *client, int bass) |
212 | { | 212 | { |
213 | /* PATH1_EQ_BASS_VOL */ | 213 | /* PATH1_EQ_BASS_VOL */ |
214 | cx25840_and_or(client, 0x8d9, ~0x3f, 48 - (bass * 48 / 0xffff)); | 214 | cx25840_and_or(client, 0x8d9, ~0x3f, 48 - (bass * 48 / 0xffff)); |
215 | } | 215 | } |
216 | 216 | ||
217 | inline static int get_treble(struct i2c_client *client) | 217 | static int get_treble(struct i2c_client *client) |
218 | { | 218 | { |
219 | /* treble is 49 steps +12dB to -12dB */ | 219 | /* treble is 49 steps +12dB to -12dB */ |
220 | 220 | ||
@@ -224,13 +224,13 @@ inline static int get_treble(struct i2c_client *client) | |||
224 | return treble; | 224 | return treble; |
225 | } | 225 | } |
226 | 226 | ||
227 | inline static void set_treble(struct i2c_client *client, int treble) | 227 | static void set_treble(struct i2c_client *client, int treble) |
228 | { | 228 | { |
229 | /* PATH1_EQ_TREBLE_VOL */ | 229 | /* PATH1_EQ_TREBLE_VOL */ |
230 | cx25840_and_or(client, 0x8db, ~0x3f, 48 - (treble * 48 / 0xffff)); | 230 | cx25840_and_or(client, 0x8db, ~0x3f, 48 - (treble * 48 / 0xffff)); |
231 | } | 231 | } |
232 | 232 | ||
233 | inline static int get_balance(struct i2c_client *client) | 233 | static int get_balance(struct i2c_client *client) |
234 | { | 234 | { |
235 | /* balance is 7 bit, 0 to -96dB */ | 235 | /* balance is 7 bit, 0 to -96dB */ |
236 | 236 | ||
@@ -244,7 +244,7 @@ inline static int get_balance(struct i2c_client *client) | |||
244 | return balance << 8; | 244 | return balance << 8; |
245 | } | 245 | } |
246 | 246 | ||
247 | inline static void set_balance(struct i2c_client *client, int balance) | 247 | static void set_balance(struct i2c_client *client, int balance) |
248 | { | 248 | { |
249 | int bal = balance >> 8; | 249 | int bal = balance >> 8; |
250 | if (bal > 0x80) { | 250 | if (bal > 0x80) { |
@@ -260,13 +260,13 @@ inline static void set_balance(struct i2c_client *client, int balance) | |||
260 | } | 260 | } |
261 | } | 261 | } |
262 | 262 | ||
263 | inline static int get_mute(struct i2c_client *client) | 263 | static int get_mute(struct i2c_client *client) |
264 | { | 264 | { |
265 | /* check SRC1_MUTE_EN */ | 265 | /* check SRC1_MUTE_EN */ |
266 | return cx25840_read(client, 0x8d3) & 0x2 ? 1 : 0; | 266 | return cx25840_read(client, 0x8d3) & 0x2 ? 1 : 0; |
267 | } | 267 | } |
268 | 268 | ||
269 | inline static void set_mute(struct i2c_client *client, int mute) | 269 | static void set_mute(struct i2c_client *client, int mute) |
270 | { | 270 | { |
271 | struct cx25840_state *state = i2c_get_clientdata(client); | 271 | struct cx25840_state *state = i2c_get_clientdata(client); |
272 | 272 | ||