diff options
-rw-r--r-- | sound/pci/hda/hda_intel.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index c9ae9f778928..d56ea2125aa8 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -255,7 +255,7 @@ enum { | |||
255 | struct azx_dev { | 255 | struct azx_dev { |
256 | u32 *bdl; /* virtual address of the BDL */ | 256 | u32 *bdl; /* virtual address of the BDL */ |
257 | dma_addr_t bdl_addr; /* physical address of the BDL */ | 257 | dma_addr_t bdl_addr; /* physical address of the BDL */ |
258 | volatile u32 *posbuf; /* position buffer pointer */ | 258 | u32 *posbuf; /* position buffer pointer */ |
259 | 259 | ||
260 | unsigned int bufsize; /* size of the play buffer in bytes */ | 260 | unsigned int bufsize; /* size of the play buffer in bytes */ |
261 | unsigned int fragsize; /* size of each period in bytes */ | 261 | unsigned int fragsize; /* size of each period in bytes */ |
@@ -1197,7 +1197,7 @@ static snd_pcm_uframes_t azx_pcm_pointer(struct snd_pcm_substream *substream) | |||
1197 | if (chip->position_fix == POS_FIX_POSBUF || | 1197 | if (chip->position_fix == POS_FIX_POSBUF || |
1198 | chip->position_fix == POS_FIX_AUTO) { | 1198 | chip->position_fix == POS_FIX_AUTO) { |
1199 | /* use the position buffer */ | 1199 | /* use the position buffer */ |
1200 | pos = *azx_dev->posbuf; | 1200 | pos = le32_to_cpu(*azx_dev->posbuf); |
1201 | if (chip->position_fix == POS_FIX_AUTO && | 1201 | if (chip->position_fix == POS_FIX_AUTO && |
1202 | azx_dev->period_intr == 1 && ! pos) { | 1202 | azx_dev->period_intr == 1 && ! pos) { |
1203 | printk(KERN_WARNING | 1203 | printk(KERN_WARNING |
@@ -1345,7 +1345,7 @@ static int __devinit azx_init_stream(struct azx *chip) | |||
1345 | struct azx_dev *azx_dev = &chip->azx_dev[i]; | 1345 | struct azx_dev *azx_dev = &chip->azx_dev[i]; |
1346 | azx_dev->bdl = (u32 *)(chip->bdl.area + off); | 1346 | azx_dev->bdl = (u32 *)(chip->bdl.area + off); |
1347 | azx_dev->bdl_addr = chip->bdl.addr + off; | 1347 | azx_dev->bdl_addr = chip->bdl.addr + off; |
1348 | azx_dev->posbuf = (volatile u32 *)(chip->posbuf.area + i * 8); | 1348 | azx_dev->posbuf = (u32 __iomem *)(chip->posbuf.area + i * 8); |
1349 | /* offset: SDI0=0x80, SDI1=0xa0, ... SDO3=0x160 */ | 1349 | /* offset: SDI0=0x80, SDI1=0xa0, ... SDO3=0x160 */ |
1350 | azx_dev->sd_addr = chip->remap_addr + (0x20 * i + 0x80); | 1350 | azx_dev->sd_addr = chip->remap_addr + (0x20 * i + 0x80); |
1351 | /* int mask: SDI0=0x01, SDI1=0x02, ... SDO3=0x80 */ | 1351 | /* int mask: SDI0=0x01, SDI1=0x02, ... SDO3=0x80 */ |
@@ -1417,8 +1417,7 @@ static int azx_free(struct azx *chip) | |||
1417 | azx_writel(chip, DPLBASE, 0); | 1417 | azx_writel(chip, DPLBASE, 0); |
1418 | azx_writel(chip, DPUBASE, 0); | 1418 | azx_writel(chip, DPUBASE, 0); |
1419 | 1419 | ||
1420 | /* wait a little for interrupts to finish */ | 1420 | synchronize_irq(chip->irq); |
1421 | msleep(1); | ||
1422 | } | 1421 | } |
1423 | 1422 | ||
1424 | if (chip->irq >= 0) { | 1423 | if (chip->irq >= 0) { |