Commit ac912b2b authored by Paul Mackerras's avatar Paul Mackerras

Merge samba.org:/home/paulus/kernel/linux-2.5

into samba.org:/home/paulus/kernel/for-linus-ppc
parents 1094cc5c bc7ae54e
......@@ -36,7 +36,6 @@
#include <asm/io.h>
#include "bttvp.h"
#include "tuner.h"
#include "bt832.h"
/* fwd decl */
......
......@@ -37,7 +37,6 @@
#include <asm/io.h>
#include "bttvp.h"
#include "tuner.h"
int bttv_num; /* number of Bt848s in use */
struct bttv bttvs[BTTV_MAX];
......
......@@ -34,7 +34,6 @@
#include <asm/io.h>
#include "bttvp.h"
#include "tuner.h"
static struct i2c_algo_bit_data bttv_i2c_algo_template;
static struct i2c_adapter bttv_i2c_adap_template;
......
......@@ -34,10 +34,12 @@
#include <linux/pci.h>
#include <asm/scatterlist.h>
#include <media/video-buf.h>
#include <media/audiochip.h>
#include <media/tuner.h>
#include "bt848.h"
#include "bttv.h"
#include "video-buf.h"
#include "audiochip.h"
#ifdef __KERNEL__
......
......@@ -56,7 +56,7 @@
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include "audiochip.h"
#include <media/audiochip.h>
#include "msp3400.h"
/* Addresses to scan */
......@@ -1495,8 +1495,8 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
VIDEO_AUDIO_MUTABLE;
if (msp->muted)
va->flags |= VIDEO_AUDIO_MUTE;
va->volume=MAX(msp->left,msp->right);
va->balance=(32768*MIN(msp->left,msp->right))/
va->volume=max(msp->left,msp->right);
va->balance=(32768*min(msp->left,msp->right))/
(va->volume ? va->volume : 1);
va->balance=(msp->left<msp->right)?
(65535-va->balance) : va->balance;
......@@ -1517,9 +1517,9 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
dprintk(KERN_DEBUG "msp34xx: VIDIOCSAUDIO\n");
msp->muted = (va->flags & VIDEO_AUDIO_MUTE);
msp->left = (MIN(65536 - va->balance,32768) *
msp->left = (min(65536 - va->balance,32768) *
va->volume) / 32768;
msp->right = (MIN(va->balance,32768) *
msp->right = (min(va->balance,(__u16)32768) *
va->volume) / 32768;
msp->bass = va->bass;
msp->treble = va->treble;
......
......@@ -24,7 +24,6 @@
#include "saa7134-reg.h"
#include "saa7134.h"
#include "tuner.h"
/* commly used strings */
static char name_mute[] = "mute";
......
......@@ -30,7 +30,6 @@
#include "saa7134-reg.h"
#include "saa7134.h"
#include "tuner.h"
MODULE_DESCRIPTION("v4l2 driver module for saa7130/34 based TV cards");
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
......
......@@ -30,8 +30,6 @@
#include "saa7134-reg.h"
#include "saa7134.h"
#include "tuner.h"
#include "id.h"
/* ----------------------------------------------------------- */
......
......@@ -29,8 +29,6 @@
#include "saa7134-reg.h"
#include "saa7134.h"
#include "tuner.h"
#include "audiochip.h"
/* ------------------------------------------------------------------ */
......
......@@ -22,7 +22,11 @@
#include <linux/i2c.h>
#include <linux/videodev.h>
#include <linux/kdev_t.h>
#include "video-buf.h"
#include <media/video-buf.h>
#include <media/tuner.h>
#include <media/audiochip.h>
#include <media/id.h>
#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,2)
......
......@@ -49,8 +49,8 @@
#include <linux/i2c-algo-bit.h>
#include "bttv.h"
#include "audiochip.h"
#include "id.h"
#include <media/audiochip.h>
#include <media/id.h>
#ifndef VIDEO_AUDIO_BALANCE
# define VIDEO_AUDIO_BALANCE 32
......
......@@ -31,8 +31,8 @@
#include <linux/init.h>
#include "bttv.h"
#include "audiochip.h"
#include "id.h"
#include <media/audiochip.h>
#include <media/id.h>
MODULE_PARM(debug,"i");
MODULE_LICENSE("GPL");
......@@ -316,17 +316,15 @@ static int tda9875_command(struct i2c_client *client,
/* min is -84 max is 24 */
left = (t->lvol+84)*606;
right = (t->rvol+84)*606;
va->volume=MAX(left,right);
va->balance=(32768*MIN(left,right))/
va->volume=max(left,right);
va->balance=(32768*min(left,right))/
(va->volume ? va->volume : 1);
va->balance=(left<right)?
(65535-va->balance) : va->balance;
va->bass = (t->bass+12)*2427; /* min -12 max +15 */
va->treble = (t->treble+12)*2730;/* min -12 max +12 */
va->mode |= VIDEO_SOUND_MONO;
break; /* VIDIOCGAUDIO case */
}
......@@ -336,9 +334,9 @@ static int tda9875_command(struct i2c_client *client,
int left,right;
dprintk("VIDEOCSAUDIO...\n");
left = (MIN(65536 - va->balance,32768) *
left = (min(65536 - va->balance,32768) *
va->volume) / 32768;
right = (MIN(va->balance,32768) *
right = (min(va->balance,(__u16)32768) *
va->volume) / 32768;
t->lvol = ((left/606)-84) & 0xff;
if (t->lvol > 24)
......
......@@ -7,8 +7,8 @@
#include <linux/errno.h>
#include <linux/slab.h>
#include "id.h"
#include "audiochip.h"
#include <media/audiochip.h>
#include <media/id.h>
/* Chips:
TDA9885 (PAL, NTSC)
......
......@@ -27,7 +27,7 @@
#include <linux/i2c.h>
#include <linux/videodev.h>
#include "tuner.h"
#include <media/tuner.h>
static int debug; /* insmod parameter */
static int this_adap;
......
......@@ -12,8 +12,8 @@
#include <linux/videodev.h>
#include <linux/init.h>
#include "tuner.h"
#include "audiochip.h"
#include <media/tuner.h>
#include <media/audiochip.h>
/* Addresses to scan */
static unsigned short normal_i2c[] = {I2C_CLIENT_END};
......
......@@ -29,9 +29,10 @@
#include <linux/init.h>
#include <linux/smp_lock.h>
#include "audiochip.h"
#include <media/audiochip.h>
#include <media/id.h>
#include "tvaudio.h"
#include "id.h"
/* ---------------------------------------------------------------------- */
......@@ -1477,8 +1478,8 @@ static int chip_command(struct i2c_client *client,
if (desc->flags & CHIP_HAS_VOLUME) {
va->flags |= VIDEO_AUDIO_VOLUME;
va->volume = MAX(chip->left,chip->right);
va->balance = (32768*MIN(chip->left,chip->right))/
va->volume = max(chip->left,chip->right);
va->balance = (32768*min(chip->left,chip->right))/
(va->volume ? va->volume : 1);
}
if (desc->flags & CHIP_HAS_BASSTREBLE) {
......@@ -1500,9 +1501,9 @@ static int chip_command(struct i2c_client *client,
struct video_audio *va = arg;
if (desc->flags & CHIP_HAS_VOLUME) {
chip->left = (MIN(65536 - va->balance,32768) *
chip->left = (min(65536 - va->balance,32768) *
va->volume) / 32768;
chip->right = (MIN(va->balance,32768) *
chip->right = (min(va->balance,(__u16)32768) *
va->volume) / 32768;
chip_write(chip,desc->leftreg,desc->volfunc(chip->left));
chip_write(chip,desc->rightreg,desc->volfunc(chip->right));
......
......@@ -16,8 +16,6 @@
#include <linux/soundcard.h>
#include <asm/uaccess.h>
#include "audiochip.h"
#include "id.h"
#define DEV_MAX 4
......@@ -136,16 +134,16 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
case MIXER_WRITE(SOUND_MIXER_VOLUME):
left = mix_to_v4l(val);
right = mix_to_v4l(val >> 8);
va.volume = MAX(left,right);
va.balance = (32768*MIN(left,right)) / (va.volume ? va.volume : 1);
va.volume = max(left,right);
va.balance = (32768*min(left,right)) / (va.volume ? va.volume : 1);
va.balance = (left<right) ? (65535-va.balance) : va.balance;
client->driver->command(client,VIDIOCSAUDIO,&va);
client->driver->command(client,VIDIOCGAUDIO,&va);
/* fall throuth */
case MIXER_READ(SOUND_MIXER_VOLUME):
left = (MIN(65536 - va.balance,32768) *
left = (min(65536 - va.balance,32768) *
va.volume) / 32768;
right = (MIN(va.balance,32768) *
right = (min(va.balance,32768) *
va.volume) / 32768;
ret = v4l_to_mix2(left,right);
break;
......
......@@ -31,7 +31,7 @@
# define TryLockPage TestSetPageLocked
#endif
#include "video-buf.h"
#include <media/video-buf.h>
static int debug = 0;
......
......@@ -239,7 +239,6 @@ extern inline char *bio_kmap_irq(struct bio *bio, unsigned long *flags)
* balancing is a lot nicer this way
*/
local_save_flags(*flags);
local_irq_disable();
addr = (unsigned long) kmap_atomic(bio_page(bio), KM_BIO_SRC_IRQ);
if (addr & ~PAGE_MASK)
......
......@@ -3,9 +3,6 @@
/* ---------------------------------------------------------------------- */
#define MIN(a,b) (((a)>(b))?(b):(a))
#define MAX(a,b) (((a)>(b))?(a):(b))
/* v4l device was opened in Radio mode */
#define AUDC_SET_RADIO _IO('m',2)
/* select from TV,radio,extern,MUTE */
......@@ -21,15 +18,6 @@
#define AUDIO_MUTE 0x80
#define AUDIO_UNMUTE 0x81
/* all the stuff below is obsolete and just here for reference. I'll
* remove it once the driver is tested and works fine.
*
* Instead creating alot of tiny API's for all kinds of different
* chips, we'll just pass throuth the v4l ioctl structs (v4l2 not
* yet...). It is a bit less flexible, but most/all used i2c chips
* make sense in v4l context only. So I think that's acceptable...
*/
/* misc stuff to pass around config info to i2c chips */
#define AUDC_CONFIG_PINNACLE _IOW('m',32,int)
......
......@@ -39,6 +39,16 @@
#include <asm/io.h>
#include <asm/bugs.h>
/*
* This is one of the first .c files built. Error out early
* if we have compiler trouble..
*/
#if __GNUC__ == 2 && __GNUC_MINOR__ == 96
#ifdef CONFIG_FRAME_POINTER
#error This compiler cannot compile correctly with frame pointers enabled
#endif
#endif
#ifdef CONFIG_X86_LOCAL_APIC
#include <asm/smp.h>
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment