Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367161
b: refs/heads/master
c: bfef0d3
h: refs/heads/master
i:
  367159: 440e567
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Apr 16, 2013
1 parent 5e2a2d5 commit c142cfe
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 93 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: 3dd473ca58838f1dd93e915cfa7a5c150186bb0f
refs/heads/master: bfef0d35e57c08dff295e3203d30f9ca4077415a
2 changes: 1 addition & 1 deletion trunk/drivers/media/pci/cx25821/cx25821-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip)
{
struct cx25821_audio_buffer *buf = chip->buf;
struct cx25821_dev *dev = chip->dev;
struct sram_channel *audio_ch =
const struct sram_channel *audio_ch =
&cx25821_sram_channels[AUDIO_SRAM_CHANNEL];
u32 tmp = 0;

Expand Down
22 changes: 11 additions & 11 deletions trunk/drivers/media/pci/cx25821/cx25821-audio-upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static int _intr_msk = FLD_AUD_SRC_RISCI1 | FLD_AUD_SRC_OF |
FLD_AUD_SRC_SYNC | FLD_AUD_SRC_OPC_ERR;

static int cx25821_sram_channel_setup_upstream_audio(struct cx25821_dev *dev,
struct sram_channel *ch,
const struct sram_channel *ch,
unsigned int bpl, u32 risc)
{
unsigned int i, lines;
Expand Down Expand Up @@ -106,7 +106,7 @@ static __le32 *cx25821_risc_field_upstream_audio(struct cx25821_dev *dev,
int fifo_enable)
{
unsigned int line;
struct sram_channel *sram_ch =
const struct sram_channel *sram_ch =
dev->channels[dev->_audio_upstream_channel].sram_channels;
int offset = 0;

Expand Down Expand Up @@ -215,7 +215,7 @@ static void cx25821_free_memory_audio(struct cx25821_dev *dev)

void cx25821_stop_upstream_audio(struct cx25821_dev *dev)
{
struct sram_channel *sram_ch =
const struct sram_channel *sram_ch =
dev->channels[AUDIO_UPSTREAM_SRAM_CHANNEL_B].sram_channels;
u32 tmp = 0;

Expand Down Expand Up @@ -257,7 +257,7 @@ void cx25821_free_mem_upstream_audio(struct cx25821_dev *dev)
}

static int cx25821_get_audio_data(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
struct file *myfile;
int frame_index_temp = dev->_audioframe_index;
Expand Down Expand Up @@ -352,7 +352,7 @@ static void cx25821_audioups_handler(struct work_struct *work)
}

static int cx25821_openfile_audio(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
struct file *myfile;
int i = 0, j = 0;
Expand Down Expand Up @@ -433,7 +433,7 @@ static int cx25821_openfile_audio(struct cx25821_dev *dev,
}

static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev,
struct sram_channel *sram_ch,
const struct sram_channel *sram_ch,
int bpl)
{
int ret = 0;
Expand Down Expand Up @@ -495,7 +495,7 @@ static 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;
const struct sram_channel *channel = dev->channels[chan_num].sram_channels;
dma_addr_t risc_phys_jump_addr;
__le32 *rp;

Expand Down Expand Up @@ -587,7 +587,7 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
struct cx25821_dev *dev = dev_id;
u32 audio_status;
int handled = 0;
struct sram_channel *sram_ch;
const struct sram_channel *sram_ch;

if (!dev)
return -1;
Expand All @@ -611,7 +611,7 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
}

static void cx25821_wait_fifo_enable(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
int count = 0;
u32 tmp;
Expand All @@ -635,7 +635,7 @@ static void cx25821_wait_fifo_enable(struct cx25821_dev *dev,
}

static int cx25821_start_audio_dma_upstream(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
u32 tmp = 0;
int err = 0;
Expand Down Expand Up @@ -699,7 +699,7 @@ static int cx25821_start_audio_dma_upstream(struct cx25821_dev *dev,

int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
{
struct sram_channel *sram_ch;
const struct sram_channel *sram_ch;
int err = 0;

if (dev->_audio_is_running) {
Expand Down
28 changes: 6 additions & 22 deletions trunk/drivers/media/pci/cx25821/cx25821-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ EXPORT_SYMBOL(cx25821_devlist_mutex);
LIST_HEAD(cx25821_devlist);
EXPORT_SYMBOL(cx25821_devlist);

struct sram_channel cx25821_sram_channels[] = {
const struct sram_channel cx25821_sram_channels[] = {
[SRAM_CH00] = {
.i = SRAM_CH00,
.name = "VID A",
Expand Down Expand Up @@ -317,20 +317,6 @@ struct sram_channel cx25821_sram_channels[] = {
};
EXPORT_SYMBOL(cx25821_sram_channels);

struct sram_channel *channel0 = &cx25821_sram_channels[SRAM_CH00];
struct sram_channel *channel1 = &cx25821_sram_channels[SRAM_CH01];
struct sram_channel *channel2 = &cx25821_sram_channels[SRAM_CH02];
struct sram_channel *channel3 = &cx25821_sram_channels[SRAM_CH03];
struct sram_channel *channel4 = &cx25821_sram_channels[SRAM_CH04];
struct sram_channel *channel5 = &cx25821_sram_channels[SRAM_CH05];
struct sram_channel *channel6 = &cx25821_sram_channels[SRAM_CH06];
struct sram_channel *channel7 = &cx25821_sram_channels[SRAM_CH07];
struct sram_channel *channel9 = &cx25821_sram_channels[SRAM_CH09];
struct sram_channel *channel10 = &cx25821_sram_channels[SRAM_CH10];
struct sram_channel *channel11 = &cx25821_sram_channels[SRAM_CH11];

struct cx25821_dmaqueue mpegq;

static int cx25821_risc_decode(u32 risc)
{
static const char * const instr[16] = {
Expand Down Expand Up @@ -457,7 +443,7 @@ static void cx25821_registers_init(struct cx25821_dev *dev)
}

int cx25821_sram_channel_setup(struct cx25821_dev *dev,
struct sram_channel *ch,
const struct sram_channel *ch,
unsigned int bpl, u32 risc)
{
unsigned int i, lines;
Expand Down Expand Up @@ -523,10 +509,9 @@ int cx25821_sram_channel_setup(struct cx25821_dev *dev,

return 0;
}
EXPORT_SYMBOL(cx25821_sram_channel_setup);

int cx25821_sram_channel_setup_audio(struct cx25821_dev *dev,
struct sram_channel *ch,
const struct sram_channel *ch,
unsigned int bpl, u32 risc)
{
unsigned int i, lines;
Expand Down Expand Up @@ -592,7 +577,7 @@ int cx25821_sram_channel_setup_audio(struct cx25821_dev *dev,
}
EXPORT_SYMBOL(cx25821_sram_channel_setup_audio);

void cx25821_sram_channel_dump(struct cx25821_dev *dev, struct sram_channel *ch)
void cx25821_sram_channel_dump(struct cx25821_dev *dev, const struct sram_channel *ch)
{
static char *name[] = {
"init risc lo",
Expand Down Expand Up @@ -652,10 +637,9 @@ void cx25821_sram_channel_dump(struct cx25821_dev *dev, struct sram_channel *ch)
pr_warn(" : cnt2_reg: 0x%08x\n",
cx_read(ch->cnt2_reg));
}
EXPORT_SYMBOL(cx25821_sram_channel_dump);

void cx25821_sram_channel_dump_audio(struct cx25821_dev *dev,
struct sram_channel *ch)
const struct sram_channel *ch)
{
static const char * const name[] = {
"init risc lo",
Expand Down Expand Up @@ -803,7 +787,7 @@ void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel_select,
}

static void cx25821_set_vip_mode(struct cx25821_dev *dev,
struct sram_channel *ch)
const struct sram_channel *ch)
{
cx_write(ch->pix_frmt, PIXEL_FRMT_422);
cx_write(ch->vip_ctl, PIXEL_ENGINE_VIP1);
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static __le32 *cx25821_risc_field_upstream_ch2(struct cx25821_dev *dev,
int fifo_enable, int field_type)
{
unsigned int line, i;
struct sram_channel *sram_ch =
const struct sram_channel *sram_ch =
dev->channels[dev->_channel2_upstream_select].sram_channels;
int dist_betwn_starts = bpl * 2;

Expand Down Expand Up @@ -201,7 +201,7 @@ static int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,

void cx25821_stop_upstream_video_ch2(struct cx25821_dev *dev)
{
struct sram_channel *sram_ch =
const struct sram_channel *sram_ch =
dev->channels[VID_UPSTREAM_SRAM_CHANNEL_J].sram_channels;
u32 tmp = 0;

Expand Down Expand Up @@ -257,7 +257,7 @@ void cx25821_free_mem_upstream_ch2(struct cx25821_dev *dev)
}

static int cx25821_get_frame_ch2(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
struct file *myfile;
int frame_index_temp = dev->_frame_index_ch2;
Expand Down Expand Up @@ -363,7 +363,7 @@ static void cx25821_vidups_handler_ch2(struct work_struct *work)
}

static int cx25821_openfile_ch2(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
struct file *myfile;
int i = 0, j = 0;
Expand Down Expand Up @@ -445,7 +445,7 @@ static int cx25821_openfile_ch2(struct cx25821_dev *dev,
}

static int cx25821_upstream_buffer_prepare_ch2(struct cx25821_dev *dev,
struct sram_channel *sram_ch,
const struct sram_channel *sram_ch,
int bpl)
{
int ret = 0;
Expand Down Expand Up @@ -515,7 +515,7 @@ static int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev,
u32 status)
{
u32 int_msk_tmp;
struct sram_channel *channel = dev->channels[chan_num].sram_channels;
const struct sram_channel *channel = dev->channels[chan_num].sram_channels;
int singlefield_lines = NTSC_FIELD_HEIGHT;
int line_size_in_bytes = Y422_LINE_SZ;
int odd_risc_prog_size = 0;
Expand Down Expand Up @@ -594,7 +594,7 @@ static irqreturn_t cx25821_upstream_irq_ch2(int irq, void *dev_id)
u32 vid_status;
int handled = 0;
int channel_num = 0;
struct sram_channel *sram_ch;
const struct sram_channel *sram_ch;

if (!dev)
return -1;
Expand All @@ -618,7 +618,7 @@ static irqreturn_t cx25821_upstream_irq_ch2(int irq, void *dev_id)
}

static void cx25821_set_pixelengine_ch2(struct cx25821_dev *dev,
struct sram_channel *ch, int pix_format)
const struct sram_channel *ch, int pix_format)
{
int width = WIDTH_D1;
int height = dev->_lines_count_ch2;
Expand Down Expand Up @@ -652,7 +652,7 @@ static void cx25821_set_pixelengine_ch2(struct cx25821_dev *dev,
}

static int cx25821_start_video_dma_upstream_ch2(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
u32 tmp = 0;
int err = 0;
Expand Down Expand Up @@ -706,7 +706,7 @@ static int cx25821_start_video_dma_upstream_ch2(struct cx25821_dev *dev,
int cx25821_vidupstream_init_ch2(struct cx25821_dev *dev, int channel_select,
int pixel_format)
{
struct sram_channel *sram_ch;
const struct sram_channel *sram_ch;
u32 tmp;
int err = 0;
int data_frame_size = 0;
Expand Down
22 changes: 11 additions & 11 deletions trunk/drivers/media/pci/cx25821/cx25821-video-upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static int _intr_msk = FLD_VID_SRC_RISC1 | FLD_VID_SRC_UF | FLD_VID_SRC_SYNC |
FLD_VID_SRC_OPC_ERR;

int cx25821_sram_channel_setup_upstream(struct cx25821_dev *dev,
struct sram_channel *ch,
const struct sram_channel *ch,
unsigned int bpl, u32 risc)
{
unsigned int i, lines;
Expand Down Expand Up @@ -135,7 +135,7 @@ static __le32 *cx25821_risc_field_upstream(struct cx25821_dev *dev, __le32 * rp,
int fifo_enable, int field_type)
{
unsigned int line, i;
struct sram_channel *sram_ch =
const struct sram_channel *sram_ch =
dev->channels[dev->_channel_upstream_select].sram_channels;
int dist_betwn_starts = bpl * 2;

Expand Down Expand Up @@ -247,7 +247,7 @@ static int cx25821_risc_buffer_upstream(struct cx25821_dev *dev,

void cx25821_stop_upstream_video_ch1(struct cx25821_dev *dev)
{
struct sram_channel *sram_ch =
const struct sram_channel *sram_ch =
dev->channels[VID_UPSTREAM_SRAM_CHANNEL_I].sram_channels;
u32 tmp = 0;

Expand Down Expand Up @@ -301,7 +301,7 @@ void cx25821_free_mem_upstream_ch1(struct cx25821_dev *dev)
}

static int cx25821_get_frame(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
struct file *myfile;
int frame_index_temp = dev->_frame_index;
Expand Down Expand Up @@ -407,7 +407,7 @@ static void cx25821_vidups_handler(struct work_struct *work)
}

static int cx25821_openfile(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
struct file *myfile;
int i = 0, j = 0;
Expand Down Expand Up @@ -489,7 +489,7 @@ static int cx25821_openfile(struct cx25821_dev *dev,
}

static int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,
struct sram_channel *sram_ch,
const struct sram_channel *sram_ch,
int bpl)
{
int ret = 0;
Expand Down Expand Up @@ -555,7 +555,7 @@ static int cx25821_video_upstream_irq(struct cx25821_dev *dev, int chan_num,
u32 status)
{
u32 int_msk_tmp;
struct sram_channel *channel = dev->channels[chan_num].sram_channels;
const struct sram_channel *channel = dev->channels[chan_num].sram_channels;
int singlefield_lines = NTSC_FIELD_HEIGHT;
int line_size_in_bytes = Y422_LINE_SZ;
int odd_risc_prog_size = 0;
Expand Down Expand Up @@ -643,7 +643,7 @@ static irqreturn_t cx25821_upstream_irq(int irq, void *dev_id)
u32 vid_status;
int handled = 0;
int channel_num = 0;
struct sram_channel *sram_ch;
const struct sram_channel *sram_ch;

if (!dev)
return -1;
Expand All @@ -668,7 +668,7 @@ static irqreturn_t cx25821_upstream_irq(int irq, void *dev_id)
}

static void cx25821_set_pixelengine(struct cx25821_dev *dev,
struct sram_channel *ch,
const struct sram_channel *ch,
int pix_format)
{
int width = WIDTH_D1;
Expand Down Expand Up @@ -701,7 +701,7 @@ static void cx25821_set_pixelengine(struct cx25821_dev *dev,
}

static int cx25821_start_video_dma_upstream(struct cx25821_dev *dev,
struct sram_channel *sram_ch)
const struct sram_channel *sram_ch)
{
u32 tmp = 0;
int err = 0;
Expand Down Expand Up @@ -755,7 +755,7 @@ static int cx25821_start_video_dma_upstream(struct cx25821_dev *dev,
int cx25821_vidupstream_init_ch1(struct cx25821_dev *dev, int channel_select,
int pixel_format)
{
struct sram_channel *sram_ch;
const struct sram_channel *sram_ch;
u32 tmp;
int err = 0;
int data_frame_size = 0;
Expand Down
Loading

0 comments on commit c142cfe

Please sign in to comment.