diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 09:16:04 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:21 -0500 |
commit | ffa74cc78125325a507b2aab7570f842a2f0aab0 (patch) | |
tree | 566417d252e4cfc530a6d211eca56cf13f6339ea /sound/pci/sonicvibes.c | |
parent | 342cd93439501f8b8f7e150ad23fb9f24d6b8920 (diff) |
ALSA: sonicvibes: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.
The debug prints are also reformatted to suit with dev_dbg().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/sonicvibes.c')
-rw-r--r-- | sound/pci/sonicvibes.c | 235 |
1 files changed, 124 insertions, 111 deletions
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 9ff408fff7b0..2044dc742071 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -273,7 +273,7 @@ static inline void snd_sonicvibes_setdmaa(struct sonicvibes * sonic, | |||
273 | outl(count, sonic->dmaa_port + SV_DMA_COUNT0); | 273 | outl(count, sonic->dmaa_port + SV_DMA_COUNT0); |
274 | outb(0x18, sonic->dmaa_port + SV_DMA_MODE); | 274 | outb(0x18, sonic->dmaa_port + SV_DMA_MODE); |
275 | #if 0 | 275 | #if 0 |
276 | printk(KERN_DEBUG "program dmaa: addr = 0x%x, paddr = 0x%x\n", | 276 | dev_dbg(sonic->card->dev, "program dmaa: addr = 0x%x, paddr = 0x%x\n", |
277 | addr, inl(sonic->dmaa_port + SV_DMA_ADDR0)); | 277 | addr, inl(sonic->dmaa_port + SV_DMA_ADDR0)); |
278 | #endif | 278 | #endif |
279 | } | 279 | } |
@@ -289,7 +289,7 @@ static inline void snd_sonicvibes_setdmac(struct sonicvibes * sonic, | |||
289 | outl(count, sonic->dmac_port + SV_DMA_COUNT0); | 289 | outl(count, sonic->dmac_port + SV_DMA_COUNT0); |
290 | outb(0x14, sonic->dmac_port + SV_DMA_MODE); | 290 | outb(0x14, sonic->dmac_port + SV_DMA_MODE); |
291 | #if 0 | 291 | #if 0 |
292 | printk(KERN_DEBUG "program dmac: addr = 0x%x, paddr = 0x%x\n", | 292 | dev_dbg(sonic->card->dev, "program dmac: addr = 0x%x, paddr = 0x%x\n", |
293 | addr, inl(sonic->dmac_port + SV_DMA_ADDR0)); | 293 | addr, inl(sonic->dmac_port + SV_DMA_ADDR0)); |
294 | #endif | 294 | #endif |
295 | } | 295 | } |
@@ -357,105 +357,105 @@ static unsigned char snd_sonicvibes_in(struct sonicvibes * sonic, unsigned char | |||
357 | #if 0 | 357 | #if 0 |
358 | static void snd_sonicvibes_debug(struct sonicvibes * sonic) | 358 | static void snd_sonicvibes_debug(struct sonicvibes * sonic) |
359 | { | 359 | { |
360 | printk(KERN_DEBUG | 360 | dev_dbg(sonic->card->dev, |
361 | "SV REGS: INDEX = 0x%02x ", inb(SV_REG(sonic, INDEX))); | 361 | "SV REGS: INDEX = 0x%02x STATUS = 0x%02x\n", |
362 | printk(" STATUS = 0x%02x\n", inb(SV_REG(sonic, STATUS))); | 362 | inb(SV_REG(sonic, INDEX)), inb(SV_REG(sonic, STATUS))); |
363 | printk(KERN_DEBUG | 363 | dev_dbg(sonic->card->dev, |
364 | " 0x00: left input = 0x%02x ", snd_sonicvibes_in(sonic, 0x00)); | 364 | " 0x00: left input = 0x%02x 0x20: synth rate low = 0x%02x\n", |
365 | printk(" 0x20: synth rate low = 0x%02x\n", snd_sonicvibes_in(sonic, 0x20)); | 365 | snd_sonicvibes_in(sonic, 0x00), snd_sonicvibes_in(sonic, 0x20)); |
366 | printk(KERN_DEBUG | 366 | dev_dbg(sonic->card->dev, |
367 | " 0x01: right input = 0x%02x ", snd_sonicvibes_in(sonic, 0x01)); | 367 | " 0x01: right input = 0x%02x 0x21: synth rate high = 0x%02x\n", |
368 | printk(" 0x21: synth rate high = 0x%02x\n", snd_sonicvibes_in(sonic, 0x21)); | 368 | snd_sonicvibes_in(sonic, 0x01), snd_sonicvibes_in(sonic, 0x21)); |
369 | printk(KERN_DEBUG | 369 | dev_dbg(sonic->card->dev, |
370 | " 0x02: left AUX1 = 0x%02x ", snd_sonicvibes_in(sonic, 0x02)); | 370 | " 0x02: left AUX1 = 0x%02x 0x22: ADC clock = 0x%02x\n", |
371 | printk(" 0x22: ADC clock = 0x%02x\n", snd_sonicvibes_in(sonic, 0x22)); | 371 | snd_sonicvibes_in(sonic, 0x02), snd_sonicvibes_in(sonic, 0x22)); |
372 | printk(KERN_DEBUG | 372 | dev_dbg(sonic->card->dev, |
373 | " 0x03: right AUX1 = 0x%02x ", snd_sonicvibes_in(sonic, 0x03)); | 373 | " 0x03: right AUX1 = 0x%02x 0x23: ADC alt rate = 0x%02x\n", |
374 | printk(" 0x23: ADC alt rate = 0x%02x\n", snd_sonicvibes_in(sonic, 0x23)); | 374 | snd_sonicvibes_in(sonic, 0x03), snd_sonicvibes_in(sonic, 0x23)); |
375 | printk(KERN_DEBUG | 375 | dev_dbg(sonic->card->dev, |
376 | " 0x04: left CD = 0x%02x ", snd_sonicvibes_in(sonic, 0x04)); | 376 | " 0x04: left CD = 0x%02x 0x24: ADC pll M = 0x%02x\n", |
377 | printk(" 0x24: ADC pll M = 0x%02x\n", snd_sonicvibes_in(sonic, 0x24)); | 377 | snd_sonicvibes_in(sonic, 0x04), snd_sonicvibes_in(sonic, 0x24)); |
378 | printk(KERN_DEBUG | 378 | dev_dbg(sonic->card->dev, |
379 | " 0x05: right CD = 0x%02x ", snd_sonicvibes_in(sonic, 0x05)); | 379 | " 0x05: right CD = 0x%02x 0x25: ADC pll N = 0x%02x\n", |
380 | printk(" 0x25: ADC pll N = 0x%02x\n", snd_sonicvibes_in(sonic, 0x25)); | 380 | snd_sonicvibes_in(sonic, 0x05), snd_sonicvibes_in(sonic, 0x25)); |
381 | printk(KERN_DEBUG | 381 | dev_dbg(sonic->card->dev, |
382 | " 0x06: left line = 0x%02x ", snd_sonicvibes_in(sonic, 0x06)); | 382 | " 0x06: left line = 0x%02x 0x26: Synth pll M = 0x%02x\n", |
383 | printk(" 0x26: Synth pll M = 0x%02x\n", snd_sonicvibes_in(sonic, 0x26)); | 383 | snd_sonicvibes_in(sonic, 0x06), snd_sonicvibes_in(sonic, 0x26)); |
384 | printk(KERN_DEBUG | 384 | dev_dbg(sonic->card->dev, |
385 | " 0x07: right line = 0x%02x ", snd_sonicvibes_in(sonic, 0x07)); | 385 | " 0x07: right line = 0x%02x 0x27: Synth pll N = 0x%02x\n", |
386 | printk(" 0x27: Synth pll N = 0x%02x\n", snd_sonicvibes_in(sonic, 0x27)); | 386 | snd_sonicvibes_in(sonic, 0x07), snd_sonicvibes_in(sonic, 0x27)); |
387 | printk(KERN_DEBUG | 387 | dev_dbg(sonic->card->dev, |
388 | " 0x08: MIC = 0x%02x ", snd_sonicvibes_in(sonic, 0x08)); | 388 | " 0x08: MIC = 0x%02x 0x28: --- = 0x%02x\n", |
389 | printk(" 0x28: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x28)); | 389 | snd_sonicvibes_in(sonic, 0x08), snd_sonicvibes_in(sonic, 0x28)); |
390 | printk(KERN_DEBUG | 390 | dev_dbg(sonic->card->dev, |
391 | " 0x09: Game port = 0x%02x ", snd_sonicvibes_in(sonic, 0x09)); | 391 | " 0x09: Game port = 0x%02x 0x29: --- = 0x%02x\n", |
392 | printk(" 0x29: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x29)); | 392 | snd_sonicvibes_in(sonic, 0x09), snd_sonicvibes_in(sonic, 0x29)); |
393 | printk(KERN_DEBUG | 393 | dev_dbg(sonic->card->dev, |
394 | " 0x0a: left synth = 0x%02x ", snd_sonicvibes_in(sonic, 0x0a)); | 394 | " 0x0a: left synth = 0x%02x 0x2a: MPU401 = 0x%02x\n", |
395 | printk(" 0x2a: MPU401 = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2a)); | 395 | snd_sonicvibes_in(sonic, 0x0a), snd_sonicvibes_in(sonic, 0x2a)); |
396 | printk(KERN_DEBUG | 396 | dev_dbg(sonic->card->dev, |
397 | " 0x0b: right synth = 0x%02x ", snd_sonicvibes_in(sonic, 0x0b)); | 397 | " 0x0b: right synth = 0x%02x 0x2b: drive ctrl = 0x%02x\n", |
398 | printk(" 0x2b: drive ctrl = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2b)); | 398 | snd_sonicvibes_in(sonic, 0x0b), snd_sonicvibes_in(sonic, 0x2b)); |
399 | printk(KERN_DEBUG | 399 | dev_dbg(sonic->card->dev, |
400 | " 0x0c: left AUX2 = 0x%02x ", snd_sonicvibes_in(sonic, 0x0c)); | 400 | " 0x0c: left AUX2 = 0x%02x 0x2c: SRS space = 0x%02x\n", |
401 | printk(" 0x2c: SRS space = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2c)); | 401 | snd_sonicvibes_in(sonic, 0x0c), snd_sonicvibes_in(sonic, 0x2c)); |
402 | printk(KERN_DEBUG | 402 | dev_dbg(sonic->card->dev, |
403 | " 0x0d: right AUX2 = 0x%02x ", snd_sonicvibes_in(sonic, 0x0d)); | 403 | " 0x0d: right AUX2 = 0x%02x 0x2d: SRS center = 0x%02x\n", |
404 | printk(" 0x2d: SRS center = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2d)); | 404 | snd_sonicvibes_in(sonic, 0x0d), snd_sonicvibes_in(sonic, 0x2d)); |
405 | printk(KERN_DEBUG | 405 | dev_dbg(sonic->card->dev, |
406 | " 0x0e: left analog = 0x%02x ", snd_sonicvibes_in(sonic, 0x0e)); | 406 | " 0x0e: left analog = 0x%02x 0x2e: wave source = 0x%02x\n", |
407 | printk(" 0x2e: wave source = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2e)); | 407 | snd_sonicvibes_in(sonic, 0x0e), snd_sonicvibes_in(sonic, 0x2e)); |
408 | printk(KERN_DEBUG | 408 | dev_dbg(sonic->card->dev, |
409 | " 0x0f: right analog = 0x%02x ", snd_sonicvibes_in(sonic, 0x0f)); | 409 | " 0x0f: right analog = 0x%02x 0x2f: --- = 0x%02x\n", |
410 | printk(" 0x2f: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2f)); | 410 | snd_sonicvibes_in(sonic, 0x0f), snd_sonicvibes_in(sonic, 0x2f)); |
411 | printk(KERN_DEBUG | 411 | dev_dbg(sonic->card->dev, |
412 | " 0x10: left PCM = 0x%02x ", snd_sonicvibes_in(sonic, 0x10)); | 412 | " 0x10: left PCM = 0x%02x 0x30: analog power = 0x%02x\n", |
413 | printk(" 0x30: analog power = 0x%02x\n", snd_sonicvibes_in(sonic, 0x30)); | 413 | snd_sonicvibes_in(sonic, 0x10), snd_sonicvibes_in(sonic, 0x30)); |
414 | printk(KERN_DEBUG | 414 | dev_dbg(sonic->card->dev, |
415 | " 0x11: right PCM = 0x%02x ", snd_sonicvibes_in(sonic, 0x11)); | 415 | " 0x11: right PCM = 0x%02x 0x31: analog power = 0x%02x\n", |
416 | printk(" 0x31: analog power = 0x%02x\n", snd_sonicvibes_in(sonic, 0x31)); | 416 | snd_sonicvibes_in(sonic, 0x11), snd_sonicvibes_in(sonic, 0x31)); |
417 | printk(KERN_DEBUG | 417 | dev_dbg(sonic->card->dev, |
418 | " 0x12: DMA data format = 0x%02x ", snd_sonicvibes_in(sonic, 0x12)); | 418 | " 0x12: DMA data format = 0x%02x 0x32: --- = 0x%02x\n", |
419 | printk(" 0x32: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x32)); | 419 | snd_sonicvibes_in(sonic, 0x12), snd_sonicvibes_in(sonic, 0x32)); |
420 | printk(KERN_DEBUG | 420 | dev_dbg(sonic->card->dev, |
421 | " 0x13: P/C enable = 0x%02x ", snd_sonicvibes_in(sonic, 0x13)); | 421 | " 0x13: P/C enable = 0x%02x 0x33: --- = 0x%02x\n", |
422 | printk(" 0x33: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x33)); | 422 | snd_sonicvibes_in(sonic, 0x13), snd_sonicvibes_in(sonic, 0x33)); |
423 | printk(KERN_DEBUG | 423 | dev_dbg(sonic->card->dev, |
424 | " 0x14: U/D button = 0x%02x ", snd_sonicvibes_in(sonic, 0x14)); | 424 | " 0x14: U/D button = 0x%02x 0x34: --- = 0x%02x\n", |
425 | printk(" 0x34: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x34)); | 425 | snd_sonicvibes_in(sonic, 0x14), snd_sonicvibes_in(sonic, 0x34)); |
426 | printk(KERN_DEBUG | 426 | dev_dbg(sonic->card->dev, |
427 | " 0x15: revision = 0x%02x ", snd_sonicvibes_in(sonic, 0x15)); | 427 | " 0x15: revision = 0x%02x 0x35: --- = 0x%02x\n", |
428 | printk(" 0x35: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x35)); | 428 | snd_sonicvibes_in(sonic, 0x15), snd_sonicvibes_in(sonic, 0x35)); |
429 | printk(KERN_DEBUG | 429 | dev_dbg(sonic->card->dev, |
430 | " 0x16: ADC output ctrl = 0x%02x ", snd_sonicvibes_in(sonic, 0x16)); | 430 | " 0x16: ADC output ctrl = 0x%02x 0x36: --- = 0x%02x\n", |
431 | printk(" 0x36: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x36)); | 431 | snd_sonicvibes_in(sonic, 0x16), snd_sonicvibes_in(sonic, 0x36)); |
432 | printk(KERN_DEBUG | 432 | dev_dbg(sonic->card->dev, |
433 | " 0x17: --- = 0x%02x ", snd_sonicvibes_in(sonic, 0x17)); | 433 | " 0x17: --- = 0x%02x 0x37: --- = 0x%02x\n", |
434 | printk(" 0x37: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x37)); | 434 | snd_sonicvibes_in(sonic, 0x17), snd_sonicvibes_in(sonic, 0x37)); |
435 | printk(KERN_DEBUG | 435 | dev_dbg(sonic->card->dev, |
436 | " 0x18: DMA A upper cnt = 0x%02x ", snd_sonicvibes_in(sonic, 0x18)); | 436 | " 0x18: DMA A upper cnt = 0x%02x 0x38: --- = 0x%02x\n", |
437 | printk(" 0x38: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x38)); | 437 | snd_sonicvibes_in(sonic, 0x18), snd_sonicvibes_in(sonic, 0x38)); |
438 | printk(KERN_DEBUG | 438 | dev_dbg(sonic->card->dev, |
439 | " 0x19: DMA A lower cnt = 0x%02x ", snd_sonicvibes_in(sonic, 0x19)); | 439 | " 0x19: DMA A lower cnt = 0x%02x 0x39: --- = 0x%02x\n", |
440 | printk(" 0x39: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x39)); | 440 | snd_sonicvibes_in(sonic, 0x19), snd_sonicvibes_in(sonic, 0x39)); |
441 | printk(KERN_DEBUG | 441 | dev_dbg(sonic->card->dev, |
442 | " 0x1a: --- = 0x%02x ", snd_sonicvibes_in(sonic, 0x1a)); | 442 | " 0x1a: --- = 0x%02x 0x3a: --- = 0x%02x\n", |
443 | printk(" 0x3a: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3a)); | 443 | snd_sonicvibes_in(sonic, 0x1a), snd_sonicvibes_in(sonic, 0x3a)); |
444 | printk(KERN_DEBUG | 444 | dev_dbg(sonic->card->dev, |
445 | " 0x1b: --- = 0x%02x ", snd_sonicvibes_in(sonic, 0x1b)); | 445 | " 0x1b: --- = 0x%02x 0x3b: --- = 0x%02x\n", |
446 | printk(" 0x3b: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3b)); | 446 | snd_sonicvibes_in(sonic, 0x1b), snd_sonicvibes_in(sonic, 0x3b)); |
447 | printk(KERN_DEBUG | 447 | dev_dbg(sonic->card->dev, |
448 | " 0x1c: DMA C upper cnt = 0x%02x ", snd_sonicvibes_in(sonic, 0x1c)); | 448 | " 0x1c: DMA C upper cnt = 0x%02x 0x3c: --- = 0x%02x\n", |
449 | printk(" 0x3c: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3c)); | 449 | snd_sonicvibes_in(sonic, 0x1c), snd_sonicvibes_in(sonic, 0x3c)); |
450 | printk(KERN_DEBUG | 450 | dev_dbg(sonic->card->dev, |
451 | " 0x1d: DMA C upper cnt = 0x%02x ", snd_sonicvibes_in(sonic, 0x1d)); | 451 | " 0x1d: DMA C upper cnt = 0x%02x 0x3d: --- = 0x%02x\n", |
452 | printk(" 0x3d: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3d)); | 452 | snd_sonicvibes_in(sonic, 0x1d), snd_sonicvibes_in(sonic, 0x3d)); |
453 | printk(KERN_DEBUG | 453 | dev_dbg(sonic->card->dev, |
454 | " 0x1e: PCM rate low = 0x%02x ", snd_sonicvibes_in(sonic, 0x1e)); | 454 | " 0x1e: PCM rate low = 0x%02x 0x3e: --- = 0x%02x\n", |
455 | printk(" 0x3e: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3e)); | 455 | snd_sonicvibes_in(sonic, 0x1e), snd_sonicvibes_in(sonic, 0x3e)); |
456 | printk(KERN_DEBUG | 456 | dev_dbg(sonic->card->dev, |
457 | " 0x1f: PCM rate high = 0x%02x ", snd_sonicvibes_in(sonic, 0x1f)); | 457 | " 0x1f: PCM rate high = 0x%02x 0x3f: --- = 0x%02x\n", |
458 | printk(" 0x3f: --- = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3f)); | 458 | snd_sonicvibes_in(sonic, 0x1f), snd_sonicvibes_in(sonic, 0x3f)); |
459 | } | 459 | } |
460 | 460 | ||
461 | #endif | 461 | #endif |
@@ -511,8 +511,10 @@ static void snd_sonicvibes_pll(unsigned int rate, | |||
511 | *res_m = m; | 511 | *res_m = m; |
512 | *res_n = n; | 512 | *res_n = n; |
513 | #if 0 | 513 | #if 0 |
514 | printk(KERN_DEBUG "metric = %i, xm = %i, xn = %i\n", metric, xm, xn); | 514 | dev_dbg(sonic->card->dev, |
515 | printk(KERN_DEBUG "pll: m = 0x%x, r = 0x%x, n = 0x%x\n", reg, m, r, n); | 515 | "metric = %i, xm = %i, xn = %i\n", metric, xm, xn); |
516 | dev_dbg(sonic->card->dev, | ||
517 | "pll: m = 0x%x, r = 0x%x, n = 0x%x\n", reg, m, r, n); | ||
516 | #endif | 518 | #endif |
517 | } | 519 | } |
518 | 520 | ||
@@ -624,7 +626,8 @@ static irqreturn_t snd_sonicvibes_interrupt(int irq, void *dev_id) | |||
624 | return IRQ_NONE; | 626 | return IRQ_NONE; |
625 | if (status == 0xff) { /* failure */ | 627 | if (status == 0xff) { /* failure */ |
626 | outb(sonic->irqmask = ~0, SV_REG(sonic, IRQMASK)); | 628 | outb(sonic->irqmask = ~0, SV_REG(sonic, IRQMASK)); |
627 | snd_printk(KERN_ERR "IRQ failure - interrupts disabled!!\n"); | 629 | dev_err(sonic->card->dev, |
630 | "IRQ failure - interrupts disabled!!\n"); | ||
628 | return IRQ_HANDLED; | 631 | return IRQ_HANDLED; |
629 | } | 632 | } |
630 | if (sonic->pcm) { | 633 | if (sonic->pcm) { |
@@ -1198,7 +1201,8 @@ static int snd_sonicvibes_create_gameport(struct sonicvibes *sonic) | |||
1198 | 1201 | ||
1199 | sonic->gameport = gp = gameport_allocate_port(); | 1202 | sonic->gameport = gp = gameport_allocate_port(); |
1200 | if (!gp) { | 1203 | if (!gp) { |
1201 | printk(KERN_ERR "sonicvibes: cannot allocate memory for gameport\n"); | 1204 | dev_err(sonic->card->dev, |
1205 | "sonicvibes: cannot allocate memory for gameport\n"); | ||
1202 | return -ENOMEM; | 1206 | return -ENOMEM; |
1203 | } | 1207 | } |
1204 | 1208 | ||
@@ -1267,7 +1271,8 @@ static int snd_sonicvibes_create(struct snd_card *card, | |||
1267 | /* check, if we can restrict PCI DMA transfers to 24 bits */ | 1271 | /* check, if we can restrict PCI DMA transfers to 24 bits */ |
1268 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || | 1272 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || |
1269 | pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { | 1273 | pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { |
1270 | snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n"); | 1274 | dev_err(card->dev, |
1275 | "architecture does not support 24bit PCI busmaster DMA\n"); | ||
1271 | pci_disable_device(pci); | 1276 | pci_disable_device(pci); |
1272 | return -ENXIO; | 1277 | return -ENXIO; |
1273 | } | 1278 | } |
@@ -1296,7 +1301,7 @@ static int snd_sonicvibes_create(struct snd_card *card, | |||
1296 | 1301 | ||
1297 | if (request_irq(pci->irq, snd_sonicvibes_interrupt, IRQF_SHARED, | 1302 | if (request_irq(pci->irq, snd_sonicvibes_interrupt, IRQF_SHARED, |
1298 | KBUILD_MODNAME, sonic)) { | 1303 | KBUILD_MODNAME, sonic)) { |
1299 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1304 | dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); |
1300 | snd_sonicvibes_free(sonic); | 1305 | snd_sonicvibes_free(sonic); |
1301 | return -EBUSY; | 1306 | return -EBUSY; |
1302 | } | 1307 | } |
@@ -1310,24 +1315,32 @@ static int snd_sonicvibes_create(struct snd_card *card, | |||
1310 | if (!dmaa) { | 1315 | if (!dmaa) { |
1311 | dmaa = dmaio; | 1316 | dmaa = dmaio; |
1312 | dmaio += 0x10; | 1317 | dmaio += 0x10; |
1313 | snd_printk(KERN_INFO "BIOS did not allocate DDMA channel A i/o, allocated at 0x%x\n", dmaa); | 1318 | dev_info(card->dev, |
1319 | "BIOS did not allocate DDMA channel A i/o, allocated at 0x%x\n", | ||
1320 | dmaa); | ||
1314 | } | 1321 | } |
1315 | if (!dmac) { | 1322 | if (!dmac) { |
1316 | dmac = dmaio; | 1323 | dmac = dmaio; |
1317 | dmaio += 0x10; | 1324 | dmaio += 0x10; |
1318 | snd_printk(KERN_INFO "BIOS did not allocate DDMA channel C i/o, allocated at 0x%x\n", dmac); | 1325 | dev_info(card->dev, |
1326 | "BIOS did not allocate DDMA channel C i/o, allocated at 0x%x\n", | ||
1327 | dmac); | ||
1319 | } | 1328 | } |
1320 | pci_write_config_dword(pci, 0x40, dmaa); | 1329 | pci_write_config_dword(pci, 0x40, dmaa); |
1321 | pci_write_config_dword(pci, 0x48, dmac); | 1330 | pci_write_config_dword(pci, 0x48, dmac); |
1322 | 1331 | ||
1323 | if ((sonic->res_dmaa = request_region(dmaa, 0x10, "S3 SonicVibes DDMA-A")) == NULL) { | 1332 | if ((sonic->res_dmaa = request_region(dmaa, 0x10, "S3 SonicVibes DDMA-A")) == NULL) { |
1324 | snd_sonicvibes_free(sonic); | 1333 | snd_sonicvibes_free(sonic); |
1325 | snd_printk(KERN_ERR "unable to grab DDMA-A port at 0x%x-0x%x\n", dmaa, dmaa + 0x10 - 1); | 1334 | dev_err(card->dev, |
1335 | "unable to grab DDMA-A port at 0x%x-0x%x\n", | ||
1336 | dmaa, dmaa + 0x10 - 1); | ||
1326 | return -EBUSY; | 1337 | return -EBUSY; |
1327 | } | 1338 | } |
1328 | if ((sonic->res_dmac = request_region(dmac, 0x10, "S3 SonicVibes DDMA-C")) == NULL) { | 1339 | if ((sonic->res_dmac = request_region(dmac, 0x10, "S3 SonicVibes DDMA-C")) == NULL) { |
1329 | snd_sonicvibes_free(sonic); | 1340 | snd_sonicvibes_free(sonic); |
1330 | snd_printk(KERN_ERR "unable to grab DDMA-C port at 0x%x-0x%x\n", dmac, dmac + 0x10 - 1); | 1341 | dev_err(card->dev, |
1342 | "unable to grab DDMA-C port at 0x%x-0x%x\n", | ||
1343 | dmac, dmac + 0x10 - 1); | ||
1331 | return -EBUSY; | 1344 | return -EBUSY; |
1332 | } | 1345 | } |
1333 | 1346 | ||