Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219241
b: refs/heads/master
c: e4115bb
h: refs/heads/master
i:
  219239: 2448839
v: v3
  • Loading branch information
Ruslan Pisarev authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 2cfdfaf commit a53fc64
Show file tree
Hide file tree
Showing 13 changed files with 169 additions and 180 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: 01bc79918637432bf6ee7f4ad7fa547c0a14fa6a
refs/heads/master: e4115bb2841019aa19cc5bcf0f1aa24789d05ccf
13 changes: 6 additions & 7 deletions trunk/drivers/staging/cx25821/cx25821-audio-upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ MODULE_AUTHOR("Hiep Huynh <hiep.huynh@conexant.com>");
MODULE_LICENSE("GPL");

static int _intr_msk =
FLD_AUD_SRC_RISCI1 | FLD_AUD_SRC_OF | FLD_AUD_SRC_SYNC |
FLD_AUD_SRC_OPC_ERR;
FLD_AUD_SRC_RISCI1 | FLD_AUD_SRC_OF | FLD_AUD_SRC_SYNC |
FLD_AUD_SRC_OPC_ERR;

int cx25821_sram_channel_setup_upstream_audio(struct cx25821_dev *dev,
struct sram_channel *ch,
Expand Down Expand Up @@ -506,7 +506,7 @@ int cx25821_audio_upstream_irq(struct cx25821_dev *dev, int chan_num,
{
int i = 0;
u32 int_msk_tmp;
struct sram_channel *channel = dev->channels[chan_num].sram_channels;
struct sram_channel *channel = dev->channels[chan_num].sram_channels;
dma_addr_t risc_phys_jump_addr;
__le32 *rp;

Expand Down Expand Up @@ -608,7 +608,7 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
if (!dev)
return -1;

sram_ch = dev->channels[dev->_audio_upstream_channel_select].
sram_ch = dev->channels[dev->_audio_upstream_channel_select].
sram_channels;

msk_stat = cx_read(sram_ch->int_mstat);
Expand Down Expand Up @@ -733,7 +733,7 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
}

dev->_audio_upstream_channel_select = channel_select;
sram_ch = dev->channels[channel_select].sram_channels;
sram_ch = dev->channels[channel_select].sram_channels;

/* Work queue */
INIT_WORK(&dev->_audio_work_entry, cx25821_audioups_handler);
Expand Down Expand Up @@ -764,9 +764,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
str_length + 1);

/* Default if filename is empty string */
if (strcmp(dev->input_audiofilename, "") == 0) {
if (strcmp(dev->input_audiofilename, "") == 0)
dev->_audiofilename = "/root/audioGOOD.wav";
}
} else {
str_length = strlen(_defaultAudioName);
dev->_audiofilename = kmalloc(str_length + 1, GFP_KERNEL);
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/cx25821/cx25821-audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
#define NUMBER_OF_PROGRAMS 8

/*
Max size of the RISC program for a buffer. - worst case is 2 writes per line
Space is also added for the 4 no-op instructions added on the end.
*/
* Max size of the RISC program for a buffer. - worst case is 2 writes per line
* Space is also added for the 4 no-op instructions added on the end.
*/
#ifndef USE_RISC_NOOP
#define MAX_BUFFER_PROGRAM_SIZE \
(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE*4)
(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE*4)
#endif

/* MAE 12 July 2005 Try to use NOOP RISC instruction instead */
#ifdef USE_RISC_NOOP
#define MAX_BUFFER_PROGRAM_SIZE \
(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_NOOP_INSTRUCTION_SIZE*4)
(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_NOOP_INSTRUCTION_SIZE*4)
#endif

/* Sizes of various instructions in bytes. Used when adding instructions. */
Expand Down
62 changes: 31 additions & 31 deletions trunk/drivers/staging/cx25821/cx25821-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static unsigned int card[] = {[0 ... (CX25821_MAXBOARDS - 1)] = UNSET };
module_param_array(card, int, NULL, 0444);
MODULE_PARM_DESC(card, "card type");

static unsigned int cx25821_devcount = 0;
static unsigned int cx25821_devcount;

static DEFINE_MUTEX(devlist);
LIST_HEAD(cx25821_devlist);
Expand Down Expand Up @@ -781,14 +781,14 @@ static void cx25821_shutdown(struct cx25821_dev *dev)

/* Disable Video A/B activity */
for (i = 0; i < VID_CHANNEL_NUM; i++) {
cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
cx_write(dev->channels[i].sram_channels->int_msk, 0);
cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
cx_write(dev->channels[i].sram_channels->int_msk, 0);
}

for (i = VID_UPSTREAM_SRAM_CHANNEL_I; i <= VID_UPSTREAM_SRAM_CHANNEL_J;
i++) {
cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
cx_write(dev->channels[i].sram_channels->int_msk, 0);
for (i = VID_UPSTREAM_SRAM_CHANNEL_I;
i <= VID_UPSTREAM_SRAM_CHANNEL_J; i++) {
cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
cx_write(dev->channels[i].sram_channels->int_msk, 0);
}

/* Disable Audio activity */
Expand All @@ -806,9 +806,9 @@ void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel_select,
u32 format)
{
if (channel_select <= 7 && channel_select >= 0) {
cx_write(dev->channels[channel_select].
sram_channels->pix_frmt, format);
dev->channels[channel_select].pixel_formats = format;
cx_write(dev->channels[channel_select].
sram_channels->pix_frmt, format);
dev->channels[channel_select].pixel_formats = format;
}
}

Expand All @@ -829,7 +829,7 @@ static void cx25821_initialize(struct cx25821_dev *dev)
cx_write(PCI_INT_STAT, 0xffffffff);

for (i = 0; i < VID_CHANNEL_NUM; i++)
cx_write(dev->channels[i].sram_channels->int_stat, 0xffffffff);
cx_write(dev->channels[i].sram_channels->int_stat, 0xffffffff);

cx_write(AUD_A_INT_STAT, 0xffffffff);
cx_write(AUD_B_INT_STAT, 0xffffffff);
Expand All @@ -843,22 +843,22 @@ static void cx25821_initialize(struct cx25821_dev *dev)
mdelay(100);

for (i = 0; i < VID_CHANNEL_NUM; i++) {
cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
cx25821_sram_channel_setup(dev, dev->channels[i].sram_channels,
1440, 0);
dev->channels[i].pixel_formats = PIXEL_FRMT_422;
dev->channels[i].use_cif_resolution = FALSE;
cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
cx25821_sram_channel_setup(dev, dev->channels[i].sram_channels,
1440, 0);
dev->channels[i].pixel_formats = PIXEL_FRMT_422;
dev->channels[i].use_cif_resolution = FALSE;
}

/* Probably only affect Downstream */
for (i = VID_UPSTREAM_SRAM_CHANNEL_I; i <= VID_UPSTREAM_SRAM_CHANNEL_J;
i++) {
cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
for (i = VID_UPSTREAM_SRAM_CHANNEL_I;
i <= VID_UPSTREAM_SRAM_CHANNEL_J; i++) {
cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
}

cx25821_sram_channel_setup_audio(dev,
dev->channels[SRAM_CH08].sram_channels,
128, 0);
cx25821_sram_channel_setup_audio(dev,
dev->channels[SRAM_CH08].sram_channels,
128, 0);

cx25821_gpio_init(dev);
}
Expand Down Expand Up @@ -931,8 +931,8 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)

/* Apply a sensible clock frequency for the PCIe bridge */
dev->clk_freq = 28000000;
for (i = 0; i < MAX_VID_CHANNEL_NUM; i++)
dev->channels[i].sram_channels = &cx25821_sram_channels[i];
for (i = 0; i < MAX_VID_CHANNEL_NUM; i++)
dev->channels[i].sram_channels = &cx25821_sram_channels[i];

if (dev->nr > 1)
CX25821_INFO("dev->nr > 1!");
Expand Down Expand Up @@ -1003,11 +1003,11 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)

cx25821_card_setup(dev);

if (medusa_video_init(dev) < 0)
CX25821_ERR("%s() Failed to initialize medusa!\n"
, __func__);
if (medusa_video_init(dev) < 0)
CX25821_ERR("%s() Failed to initialize medusa!\n"
, __func__);

cx25821_video_register(dev);
cx25821_video_register(dev);

/* register IOCTL device */
dev->ioctl_dev =
Expand Down Expand Up @@ -1342,12 +1342,12 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id)

for (i = 0; i < VID_CHANNEL_NUM; i++) {
if (pci_status & mask[i]) {
vid_status = cx_read(dev->channels[i].
sram_channels->int_stat);
vid_status = cx_read(dev->channels[i].
sram_channels->int_stat);

if (vid_status)
handled +=
cx25821_video_irq(dev, i, vid_status);
cx25821_video_irq(dev, i, vid_status);

cx_write(PCI_INT_STAT, mask[i]);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/cx25821/cx25821-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static struct i2c_algorithm cx25821_i2c_algo_template = {
.master_xfer = i2c_xfer,
.functionality = cx25821_functionality,
#ifdef NEED_ALGO_CONTROL
.algo_control = dummy_algo_control,
.algo_control = dummy_algo_control,
#endif
};

Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/cx25821/cx25821-medusa-reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,13 +443,13 @@
/*****************************************************************************/
/* LUMA_CTRL register fields */
#define VDEC_A_BRITE_CTRL 0x1014
#define VDEC_A_CNTRST_CTRL 0x1015
#define VDEC_A_PEAK_SEL 0x1016
#define VDEC_A_CNTRST_CTRL 0x1015
#define VDEC_A_PEAK_SEL 0x1016

/*****************************************************************************/
/* CHROMA_CTRL register fields */
#define VDEC_A_USAT_CTRL 0x1018
#define VDEC_A_VSAT_CTRL 0x1019
#define VDEC_A_HUE_CTRL 0x101A
#define VDEC_A_USAT_CTRL 0x1018
#define VDEC_A_VSAT_CTRL 0x1019
#define VDEC_A_HUE_CTRL 0x101A

#endif
8 changes: 4 additions & 4 deletions trunk/drivers/staging/cx25821/cx25821-medusa-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,9 @@ int medusa_set_saturation(struct cx25821_dev *dev, int saturation, int decoder)

int medusa_video_init(struct cx25821_dev *dev)
{
u32 value = 0, tmp = 0;
int ret_val = 0;
int i = 0;
u32 value = 0, tmp = 0;
int ret_val = 0;
int i = 0;

mutex_lock(&dev->lock);

Expand Down Expand Up @@ -829,7 +829,7 @@ int medusa_video_init(struct cx25821_dev *dev)
/* select AFE clock to output mode */
value = cx25821_i2c_read(&dev->i2c_bus[0], AFE_AB_DIAG_CTRL, &tmp);
value &= 0x83FFFFFF;
ret_val =
ret_val =
cx25821_i2c_write(&dev->i2c_bus[0], AFE_AB_DIAG_CTRL,
value | 0x10000000);

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/cx25821/cx25821-reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@
#define FLD_VID_DST_RISC2 0x00000010
#define FLD_VID_SRC_RISC1 0x00000002
#define FLD_VID_DST_RISC1 0x00000001
#define FLD_VID_SRC_ERRORS FLD_VID_SRC_OPC_ERR | FLD_VID_SRC_SYNC | FLD_VID_SRC_UF
#define FLD_VID_DST_ERRORS FLD_VID_DST_OPC_ERR | FLD_VID_DST_SYNC | FLD_VID_DST_OF
#define FLD_VID_SRC_ERRORS (FLD_VID_SRC_OPC_ERR | FLD_VID_SRC_SYNC | FLD_VID_SRC_UF)
#define FLD_VID_DST_ERRORS (FLD_VID_DST_OPC_ERR | FLD_VID_DST_SYNC | FLD_VID_DST_OF)

/* ***************************************************************************** */
#define AUD_A_INT_MSK 0x0400C0 /* Audio Int interrupt mask */
Expand Down
Loading

0 comments on commit a53fc64

Please sign in to comment.