Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188939
b: refs/heads/master
c: b72f134
h: refs/heads/master
i:
  188937: b8eabc2
  188935: 71c8b29
v: v3
  • Loading branch information
Takashi Iwai committed Mar 24, 2010
1 parent 8b6d775 commit b68d5bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 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: 3cc4e53f86dab635166929bfa47cc68d59b28c26
refs/heads/master: b72f1343d63f5bad966caf6013a943f4e1db9c72
4 changes: 2 additions & 2 deletions trunk/sound/oss/vidc.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ static void vidc_audio_trigger(int dev, int enable_bits)
struct audio_operations *adev = audio_devs[dev];

if (enable_bits & PCM_ENABLE_OUTPUT) {
if (!(adev->flags & DMA_ACTIVE)) {
if (!(adev->dmap_out->flags & DMA_ACTIVE)) {
unsigned long flags;

local_irq_save(flags);

/* prevent recusion */
adev->flags |= DMA_ACTIVE;
adev->dmap_out->flags |= DMA_ACTIVE;

dma_interrupt = vidc_audio_dma_interrupt;
vidc_sound_dma_irq(0, NULL);
Expand Down
14 changes: 11 additions & 3 deletions trunk/sound/pci/cmipci.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,13 +941,21 @@ static snd_pcm_uframes_t snd_cmipci_pcm_pointer(struct cmipci *cm, struct cmipci
struct snd_pcm_substream *substream)
{
size_t ptr;
unsigned int reg;
unsigned int reg, rem, tries;

if (!rec->running)
return 0;
#if 1 // this seems better..
reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2;
ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1);
ptr >>= rec->shift;
for (tries = 0; tries < 3; tries++) {
rem = snd_cmipci_read_w(cm, reg);
if (rem < rec->dma_size)
goto ok;
}
printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem);
return SNDRV_PCM_POS_XRUN;
ok:
ptr = (rec->dma_size - (rem + 1)) >> rec->shift;
#else
reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1;
ptr = snd_cmipci_read(cm, reg) - rec->offset;
Expand Down

0 comments on commit b68d5bb

Please sign in to comment.