Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235668
b: refs/heads/master
c: 2a9a05c
h: refs/heads/master
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jan 21, 2011
1 parent ce70d67 commit 7b746ec
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9855917290fc40dbfd67d3ee06c190667d6c5b5
refs/heads/master: 2a9a05c43294d703e351753da49231c47e0aad0d
4 changes: 4 additions & 0 deletions trunk/drivers/staging/easycap/easycap.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ int audio_idle;
int audio_eof;
int volume;
int mute;
s8 gain;

struct data_buffer audio_isoc_buffer[AUDIO_ISOC_BUFFER_MANY];

Expand Down Expand Up @@ -639,6 +640,8 @@ struct signed_div_result {
long long int quotient;
unsigned long long int remainder;
} signed_div(long long int, long long int);


/*---------------------------------------------------------------------------*/
/*
* MACROS
Expand Down Expand Up @@ -668,6 +671,7 @@ unsigned long long int remainder;
* IMMEDIATELY OBVIOUS FROM A CASUAL READING OF THE SOURCE CODE. BEWARE.
*/
/*---------------------------------------------------------------------------*/
extern int easycap_debug;
#define SAY(format, args...) do { \
printk(KERN_DEBUG "easycap:: %s: " \
format, __func__, ##args); \
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/easycap/easycap_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#if !defined(EASYCAP_IOCTL_H)
#define EASYCAP_IOCTL_H

extern int easycap_debug;
extern int easycap_gain;
extern struct easycap_dongle easycapdc60_dongle[];
extern struct easycap_standard easycap_standard[];
extern struct easycap_format easycap_format[];
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/staging/easycap/easycap_low.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,11 +1091,7 @@ SAM("0x%04X:0x%04X is audio vendor id\n", id1, id2);
* SELECT AUDIO SOURCE "LINE IN" AND SET THE AUDIO GAIN.
*/
/*---------------------------------------------------------------------------*/
if (31 < easycap_gain)
easycap_gain = 31;
if (0 > easycap_gain)
easycap_gain = 0;
if (0 != audio_gainset(pusb_device, (__s8)easycap_gain))
if (0 != audio_gainset(pusb_device, peasycap->gain))
SAY("ERROR: audio_gainset() failed\n");
check_vt(pusb_device);
return 0;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/easycap/easycap_low.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#if !defined(EASYCAP_LOW_H)
#define EASYCAP_LOW_H

extern int easycap_debug;
extern int easycap_gain;
extern struct easycap_dongle easycapdc60_dongle[];

#endif /*EASYCAP_LOW_H*/
7 changes: 6 additions & 1 deletion trunk/drivers/staging/easycap/easycap_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

int easycap_debug;
static int easycap_bars = 1;
int easycap_gain = 16;
static int easycap_gain = 16;
module_param_named(debug, easycap_debug, int, S_IRUGO | S_IWUSR);
module_param_named(bars, easycap_bars, int, S_IRUGO | S_IWUSR);
module_param_named(gain, easycap_gain, int, S_IRUGO | S_IWUSR);
Expand Down Expand Up @@ -3412,6 +3412,8 @@ struct v4l2_device *pv4l2_device;
#endif /*EASYCAP_IS_VIDEODEV_CLIENT*/
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/

/* setup modules params */

if ((struct usb_interface *)NULL == pusb_interface) {
SAY("ERROR: pusb_interface is NULL\n");
return -EFAULT;
Expand Down Expand Up @@ -3547,6 +3549,9 @@ if (0 == bInterfaceNumber) {
"%i=peasycap->kref.refcount.counter\n", \
bInterfaceNumber, peasycap->kref.refcount.counter);

/* module params */
peasycap->gain = (s8)clamp(easycap_gain, 0, 31);

init_waitqueue_head(&peasycap->wq_video);
init_waitqueue_head(&peasycap->wq_audio);
init_waitqueue_head(&peasycap->wq_trigger);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/easycap/easycap_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#if !defined(EASYCAP_SETTINGS_H)
#define EASYCAP_SETTINGS_H

extern int easycap_debug;
extern int easycap_gain;
extern struct easycap_dongle easycapdc60_dongle[];

#endif /*EASYCAP_SETTINGS_H*/
2 changes: 0 additions & 2 deletions trunk/drivers/staging/easycap/easycap_sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#if !defined(EASYCAP_SOUND_H)
#define EASYCAP_SOUND_H

extern int easycap_debug;
extern int easycap_gain;
extern struct easycap_dongle easycapdc60_dongle[];
extern struct easycap *peasycap;
extern struct usb_driver easycap_usb_driver;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/easycap/easycap_testcard.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#if !defined(EASYCAP_TESTCARD_H)
#define EASYCAP_TESTCARD_H

extern int easycap_debug;
extern int easycap_gain;
extern struct easycap_dongle easycapdc60_dongle[];

#endif /*EASYCAP_TESTCARD_H*/

0 comments on commit 7b746ec

Please sign in to comment.