aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx25840/cx25840-audio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-01-09 12:32:41 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:32:41 -0500
commitd92c20e0a5b560bbe46d7e68bb47df2366cddf8f (patch)
tree6fe906f5fb4c7bb3d3581a298ffb2ad864f43545 /drivers/media/video/cx25840/cx25840-audio.c
parentfac9e89999a12f378112fe93764b30196bc03f46 (diff)
V4L/DVB (3279): Added VIDIOC_QUERYCTRL to cx25840.
- Added VIDIOC_QUERYCTRL - Removed unnecessary inlines. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-audio.c')
-rw-r--r--drivers/media/video/cx25840/cx25840-audio.c20
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
173inline static int get_volume(struct i2c_client *client) 173static 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
184inline static void set_volume(struct i2c_client *client, int volume) 184static 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
201inline static int get_bass(struct i2c_client *client) 201static 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
211inline static void set_bass(struct i2c_client *client, int bass) 211static 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
217inline static int get_treble(struct i2c_client *client) 217static 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
227inline static void set_treble(struct i2c_client *client, int treble) 227static 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
233inline static int get_balance(struct i2c_client *client) 233static 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
247inline static void set_balance(struct i2c_client *client, int balance) 247static 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
263inline static int get_mute(struct i2c_client *client) 263static 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
269inline static void set_mute(struct i2c_client *client, int mute) 269static 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