Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219699
b: refs/heads/master
c: bb59a4c
h: refs/heads/master
i:
  219697: 5896791
  219695: a9f59a5
v: v3
  • Loading branch information
Gorskin Ilya authored and Greg Kroah-Hartman committed Aug 31, 2010
1 parent bad18df commit 777e879
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 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: c6eae6774800a18b572ccc448ef8bff3984ecfe7
refs/heads/master: bb59a4c539140592723e806e852ee171da0eb3eb
15 changes: 7 additions & 8 deletions trunk/drivers/staging/cx25821/cx25821-audio-upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ 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 +505,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,8 +607,8 @@ 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_channels;
sram_ch = dev->channels[dev->_audio_upstream_channel_select].
sram_channels;

msk_stat = cx_read(sram_ch->int_mstat);
audio_status = cx_read(sram_ch->int_stat);
Expand Down Expand Up @@ -733,7 +732,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 +763,9 @@ 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
16 changes: 10 additions & 6 deletions trunk/drivers/staging/cx25821/cx25821-audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@
#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)
#define MAX_BUFFER_PROGRAM_SIZE \
(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*4l)

#endif

/* Sizes of various instructions in bytes. Used when adding instructions. */
Expand All @@ -53,6 +56,7 @@
#define RISC_WRITECR_INSTRUCTION_SIZE 16
#define RISC_NOOP_INSTRUCTION_SIZE 4

#define MAX_AUDIO_DMA_BUFFER_SIZE (MAX_BUFFER_PROGRAM_SIZE * NUMBER_OF_PROGRAMS + RISC_SYNC_INSTRUCTION_SIZE)
#define MAX_AUDIO_DMA_BUFFER_SIZE \
(MAX_BUFFER_PROGRAM_SIZE * NUMBER_OF_PROGRAMS + RISC_SYNC_INSTRUCTION_SIZE)

#endif

0 comments on commit 777e879

Please sign in to comment.