diff options
Diffstat (limited to 'sound/pci/intel8x0m.c')
-rw-r--r-- | sound/pci/intel8x0m.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 93449e464566..6ec0fc50d6be 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -411,7 +411,10 @@ static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ic | |||
411 | bdbar[idx + 0] = cpu_to_le32(ichdev->physbuf + (((idx >> 1) * ichdev->fragsize) % ichdev->size)); | 411 | bdbar[idx + 0] = cpu_to_le32(ichdev->physbuf + (((idx >> 1) * ichdev->fragsize) % ichdev->size)); |
412 | bdbar[idx + 1] = cpu_to_le32(0x80000000 | /* interrupt on completion */ | 412 | bdbar[idx + 1] = cpu_to_le32(0x80000000 | /* interrupt on completion */ |
413 | ichdev->fragsize >> chip->pcm_pos_shift); | 413 | ichdev->fragsize >> chip->pcm_pos_shift); |
414 | // printk("bdbar[%i] = 0x%x [0x%x]\n", idx + 0, bdbar[idx + 0], bdbar[idx + 1]); | 414 | /* |
415 | printk(KERN_DEBUG "bdbar[%i] = 0x%x [0x%x]\n", | ||
416 | idx + 0, bdbar[idx + 0], bdbar[idx + 1]); | ||
417 | */ | ||
415 | } | 418 | } |
416 | ichdev->frags = ichdev->size / ichdev->fragsize; | 419 | ichdev->frags = ichdev->size / ichdev->fragsize; |
417 | } | 420 | } |
@@ -421,8 +424,10 @@ static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ic | |||
421 | ichdev->lvi_frag = ICH_REG_LVI_MASK % ichdev->frags; | 424 | ichdev->lvi_frag = ICH_REG_LVI_MASK % ichdev->frags; |
422 | ichdev->position = 0; | 425 | ichdev->position = 0; |
423 | #if 0 | 426 | #if 0 |
424 | printk("lvi_frag = %i, frags = %i, period_size = 0x%x, period_size1 = 0x%x\n", | 427 | printk(KERN_DEBUG "lvi_frag = %i, frags = %i, period_size = 0x%x, " |
425 | ichdev->lvi_frag, ichdev->frags, ichdev->fragsize, ichdev->fragsize1); | 428 | "period_size1 = 0x%x\n", |
429 | ichdev->lvi_frag, ichdev->frags, ichdev->fragsize, | ||
430 | ichdev->fragsize1); | ||
426 | #endif | 431 | #endif |
427 | /* clear interrupts */ | 432 | /* clear interrupts */ |
428 | iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI); | 433 | iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI); |
@@ -465,7 +470,8 @@ static inline void snd_intel8x0_update(struct intel8x0m *chip, struct ichdev *ic | |||
465 | ichdev->lvi_frag * | 470 | ichdev->lvi_frag * |
466 | ichdev->fragsize1); | 471 | ichdev->fragsize1); |
467 | #if 0 | 472 | #if 0 |
468 | printk("new: bdbar[%i] = 0x%x [0x%x], prefetch = %i, all = 0x%x, 0x%x\n", | 473 | printk(KERN_DEBUG "new: bdbar[%i] = 0x%x [0x%x], " |
474 | "prefetch = %i, all = 0x%x, 0x%x\n", | ||
469 | ichdev->lvi * 2, ichdev->bdbar[ichdev->lvi * 2], | 475 | ichdev->lvi * 2, ichdev->bdbar[ichdev->lvi * 2], |
470 | ichdev->bdbar[ichdev->lvi * 2 + 1], inb(ICH_REG_OFF_PIV + port), | 476 | ichdev->bdbar[ichdev->lvi * 2 + 1], inb(ICH_REG_OFF_PIV + port), |
471 | inl(port + 4), inb(port + ICH_REG_OFF_CR)); | 477 | inl(port + 4), inb(port + ICH_REG_OFF_CR)); |
@@ -1269,9 +1275,9 @@ static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, | |||
1269 | int err; | 1275 | int err; |
1270 | struct shortname_table *name; | 1276 | struct shortname_table *name; |
1271 | 1277 | ||
1272 | card = snd_card_new(index, id, THIS_MODULE, 0); | 1278 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); |
1273 | if (card == NULL) | 1279 | if (err < 0) |
1274 | return -ENOMEM; | 1280 | return err; |
1275 | 1281 | ||
1276 | strcpy(card->driver, "ICH-MODEM"); | 1282 | strcpy(card->driver, "ICH-MODEM"); |
1277 | strcpy(card->shortname, "Intel ICH"); | 1283 | strcpy(card->shortname, "Intel ICH"); |