drivers/audio/ac97: Fix -Wformat=
Change-Id: I454ca76cfd5f8ebddb74c6b68a940d0444a82bb1 Reviewed-on: https://review.haiku-os.org/c/1530 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
650c8b81a2
commit
fe5e83a681
@@ -313,7 +313,7 @@ ac97_attach(ac97_dev **_dev, codec_reg_read reg_read, codec_reg_write reg_write,
|
||||
/* set record line in */
|
||||
ac97_reg_update(dev, AC97_RECORD_SELECT, 0x0404);
|
||||
|
||||
LOG(("codec vendor id = %#08lx\n", dev->codec_id));
|
||||
LOG(("codec vendor id = %#08" B_PRIx32 "\n", dev->codec_id));
|
||||
LOG(("codec description = %s\n", dev->codec_info));
|
||||
LOG(("codec 3d enhancement = %s\n", dev->codec_3d_stereo_enhancement));
|
||||
|
||||
@@ -438,7 +438,10 @@ ac97_set_rate(ac97_dev *dev, uint8 reg, uint32 rate)
|
||||
|
||||
value = (uint32)((rate * 48000ULL) / dev->clock); /* need 64 bit calculation for rates 96000 or higher */
|
||||
|
||||
LOG(("ac97_set_rate: clock = %ld, rate = %ld, value = %ld\n", dev->clock, rate, value));
|
||||
LOG(("ac97_set_rate: clock = %" B_PRIu32 ", "
|
||||
"rate = %" B_PRIu32 ", "
|
||||
"value = %" B_PRIu32 "\n",
|
||||
dev->clock, rate, value));
|
||||
|
||||
/* if double rate audio is currently enabled, divide value by 2 */
|
||||
if (ac97_reg_cached_read(dev, AC97_EXTENDED_STAT_CTRL) & 0x0002)
|
||||
@@ -483,7 +486,7 @@ ac97_get_rate(ac97_dev *dev, uint8 reg, uint32 *rate)
|
||||
void
|
||||
ac97_set_clock(ac97_dev *dev, uint32 clock)
|
||||
{
|
||||
LOG(("ac97_set_clock: clock = %ld\n", clock));
|
||||
LOG(("ac97_set_clock: clock = %" B_PRIu32 "\n", clock));
|
||||
dev->clock = clock;
|
||||
ac97_detect_rates(dev);
|
||||
ac97_dump_capabilities(dev);
|
||||
@@ -756,7 +759,10 @@ ad1819_set_rate(ac97_dev *dev, uint8 reg, uint32 rate)
|
||||
|
||||
value = (uint32)((rate * 48000ULL) / dev->clock); /* need 64 bit calculation for rates 96000 or higher */
|
||||
|
||||
LOG(("ad1819_set_rate: clock = %ld, rate = %ld, value = %ld\n", dev->clock, rate, value));
|
||||
LOG(("ad1819_set_rate: clock = %" B_PRIu32 ", "
|
||||
"rate = %" B_PRIu32 ", "
|
||||
"value = %" B_PRIu32 "\n",
|
||||
dev->clock, rate, value));
|
||||
|
||||
if (value < 0x1B58 || value > 0xBB80)
|
||||
return false;
|
||||
|
||||
@@ -460,11 +460,12 @@ auich_int(void *arg)
|
||||
}
|
||||
|
||||
if (sta != 0) {
|
||||
dprintf("global status not fully handled %lx!\n", sta);
|
||||
dprintf("global status not fully handled %" B_PRIx32 "!\n", sta);
|
||||
auich_reg_write_32(&card->config, AUICH_REG_GLOB_STA, sta);
|
||||
}
|
||||
} else if (sta != 0) {
|
||||
dprintf("interrupt masked %lx, sta %lx\n", card->interrupt_mask, sta);
|
||||
dprintf("interrupt masked %" B_PRIx32 ", sta %" B_PRIx32 "\n",
|
||||
card->interrupt_mask, sta);
|
||||
}
|
||||
|
||||
if (gotone)
|
||||
@@ -638,7 +639,8 @@ auich_setup(auich_dev * card)
|
||||
if (card->info.device_id == SIS_SI7012_AC97_DEVICE_ID)
|
||||
card->config.type |= TYPE_SIS7012;
|
||||
|
||||
PRINT(("%s deviceid = %#04x chiprev = %x model = %x enhanced at %lx\n",
|
||||
PRINT(("%s deviceid = %#04x chiprev = %x model = %x "
|
||||
"enhanced at %" B_PRIx32 "lx\n",
|
||||
card->name, card->info.device_id, card->info.revision,
|
||||
card->info.u.h0.subsystem_id, card->config.nabmbar));
|
||||
|
||||
@@ -731,7 +733,7 @@ auich_setup(auich_dev * card)
|
||||
"auich interrupt poller", B_REAL_TIME_PRIORITY, card);
|
||||
resume_thread(int_thread_id);
|
||||
} else {
|
||||
PRINT(("installing interrupt : %lx\n", card->config.irq));
|
||||
PRINT(("installing interrupt : %" B_PRIx32 "\n", card->config.irq));
|
||||
err = install_io_interrupt_handler(card->config.irq, auich_int,
|
||||
card, 0);
|
||||
if (err != B_OK) {
|
||||
@@ -819,7 +821,8 @@ init_driver(void)
|
||||
}
|
||||
#endif
|
||||
if (auich_setup(&cards[num_cards])) {
|
||||
PRINT(("Setup of auich %ld failed\n", num_cards+1));
|
||||
PRINT(("Setup of auich %" B_PRId32 " failed\n",
|
||||
num_cards + 1));
|
||||
#ifdef __HAIKU__
|
||||
(*pci->unreserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards]);
|
||||
|
||||
@@ -385,7 +385,7 @@ auich_create_controls_list(multi_dev *multi)
|
||||
}
|
||||
|
||||
multi->control_count = index;
|
||||
PRINT(("multi->control_count %lu\n", multi->control_count));
|
||||
PRINT(("multi->control_count %" B_PRIu32 "\n", multi->control_count));
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -398,7 +398,8 @@ auich_get_mix(auich_dev *card, multi_mix_value_info * mmvi)
|
||||
for (i = 0; i < mmvi->item_count; i++) {
|
||||
id = mmvi->values[i].id - EMU_MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= card->multi.control_count) {
|
||||
PRINT(("auich_get_mix : invalid control id requested : %li\n", id));
|
||||
PRINT(("auich_get_mix : "
|
||||
"invalid control id requested : %" B_PRIi32 "\n", id));
|
||||
continue;
|
||||
}
|
||||
control = &card->multi.controls[id];
|
||||
@@ -438,7 +439,8 @@ auich_set_mix(auich_dev *card, multi_mix_value_info * mmvi)
|
||||
for (i = 0; i < mmvi->item_count; i++) {
|
||||
id = mmvi->values[i].id - EMU_MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= card->multi.control_count) {
|
||||
PRINT(("auich_set_mix : invalid control id requested : %li\n", id));
|
||||
PRINT(("auich_set_mix : "
|
||||
"invalid control id requested : %" B_PRIi32 "\n", id));
|
||||
continue;
|
||||
}
|
||||
control = &card->multi.controls[id];
|
||||
@@ -448,7 +450,8 @@ auich_set_mix(auich_dev *card, multi_mix_value_info * mmvi)
|
||||
if (i+1<mmvi->item_count) {
|
||||
id = mmvi->values[i + 1].id - EMU_MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= card->multi.control_count) {
|
||||
PRINT(("auich_set_mix : invalid control id requested : %li\n", id));
|
||||
PRINT(("auich_set_mix : "
|
||||
"invalid control id requested : %" B_PRIi32 "\n", id));
|
||||
} else {
|
||||
control2 = &card->multi.controls[id];
|
||||
if (control2->mix_control.master != control->mix_control.id)
|
||||
|
||||
@@ -469,7 +469,7 @@ auvia_init(auvia_dev * card)
|
||||
|
||||
pr = (*pci->read_pci_config)(card->info.bus, card->info.device,
|
||||
card->info.function, AUVIA_PCICONF_JUNK, 4);
|
||||
PRINT(("AUVIA_PCICONF_JUNK before: %lx\n", pr));
|
||||
PRINT(("AUVIA_PCICONF_JUNK before: %" B_PRIx32 "\n", pr));
|
||||
pr &= ~AUVIA_PCICONF_ENABLES;
|
||||
pr |= AUVIA_PCICONF_ACLINKENAB | AUVIA_PCICONF_ACNOTRST
|
||||
| AUVIA_PCICONF_ACVSR | AUVIA_PCICONF_ACSGD;
|
||||
@@ -479,7 +479,7 @@ auvia_init(auvia_dev * card)
|
||||
snooze(100);
|
||||
pr = (*pci->read_pci_config)(card->info.bus, card->info.device,
|
||||
card->info.function, AUVIA_PCICONF_JUNK, 4);
|
||||
PRINT(("AUVIA_PCICONF_JUNK after: %lx\n", pr));
|
||||
PRINT(("AUVIA_PCICONF_JUNK after: %" B_PRIx32 "\n", pr));
|
||||
|
||||
if(IS_8233(&card->config)) {
|
||||
card->interrupt_mask =
|
||||
@@ -534,8 +534,9 @@ auvia_setup(auvia_dev * card)
|
||||
if(card->info.device_id == VIATECH_8233_AC97_DEVICE_ID)
|
||||
card->config.type |= TYPE_8233;
|
||||
|
||||
PRINT(("%s deviceid = %#04x chiprev = %x model = %x enhanced at %lx\n",
|
||||
card->name, card->info.device_id, card->info.revision,
|
||||
PRINT(("%s deviceid = %#04x chiprev = %x model = %x enhanced "
|
||||
"at %" B_PRIx32 "\n",
|
||||
card->name, card->info.device_id, card->info.revision,
|
||||
card->info.u.h0.subsystem_id, card->config.nabmbar));
|
||||
|
||||
cmd = (*pci->read_pci_config)(card->info.bus, card->info.device,
|
||||
@@ -553,7 +554,7 @@ auvia_setup(auvia_dev * card)
|
||||
(codec_reg_write)auvia_codec_write, &card->config,
|
||||
card->config.subvendor_id, card->config.subsystem_id);
|
||||
|
||||
PRINT(("installing interrupt : %lx\n", card->config.irq));
|
||||
PRINT(("installing interrupt : %" B_PRIx32 "\n", card->config.irq));
|
||||
err = install_io_interrupt_handler(card->config.irq, auvia_int, card, 0);
|
||||
if (err != B_OK) {
|
||||
PRINT(("failed to install interrupt\n"));
|
||||
@@ -606,7 +607,7 @@ init_driver(void)
|
||||
}
|
||||
#endif
|
||||
if (auvia_setup(&cards[num_cards])) {
|
||||
PRINT(("Setup of auvia %ld failed\n", num_cards+1));
|
||||
PRINT(("Setup of auvia %" B_PRId32 " failed\n", num_cards + 1));
|
||||
#ifdef __HAIKU__
|
||||
(*pci->unreserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards]);
|
||||
|
||||
@@ -390,7 +390,7 @@ auvia_create_controls_list(multi_dev *multi)
|
||||
}
|
||||
|
||||
multi->control_count = index;
|
||||
PRINT(("multi->control_count %lu\n", multi->control_count));
|
||||
PRINT(("multi->control_count %" B_PRIu32 "\n", multi->control_count));
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,8 @@ auvia_get_mix(auvia_dev *card, multi_mix_value_info * mmvi)
|
||||
for (i = 0; i < mmvi->item_count; i++) {
|
||||
id = mmvi->values[i].id - EMU_MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= card->multi.control_count) {
|
||||
PRINT(("auvia_get_mix : invalid control id requested : %li\n", id));
|
||||
PRINT(("auvia_get_mix : "
|
||||
"invalid control id requested : %" B_PRIi32 "\n", id));
|
||||
continue;
|
||||
}
|
||||
control = &card->multi.controls[id];
|
||||
@@ -443,7 +444,8 @@ auvia_set_mix(auvia_dev *card, multi_mix_value_info * mmvi)
|
||||
for (i = 0; i < mmvi->item_count; i++) {
|
||||
id = mmvi->values[i].id - EMU_MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= card->multi.control_count) {
|
||||
PRINT(("auvia_set_mix : invalid control id requested : %li\n", id));
|
||||
PRINT(("auvia_set_mix : "
|
||||
"invalid control id requested : %" B_PRIi32 "\n", id));
|
||||
continue;
|
||||
}
|
||||
control = &card->multi.controls[id];
|
||||
@@ -453,7 +455,8 @@ auvia_set_mix(auvia_dev *card, multi_mix_value_info * mmvi)
|
||||
if (i + 1 < mmvi->item_count) {
|
||||
id = mmvi->values[i + 1].id - EMU_MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= card->multi.control_count) {
|
||||
PRINT(("auvia_set_mix : invalid control id requested : %li\n", id));
|
||||
PRINT(("auvia_set_mix : "
|
||||
"invalid control id requested : %" B_PRIi32 "\n", id));
|
||||
} else {
|
||||
control2 = &card->multi.controls[id];
|
||||
if (control2->mix_control.master != control->mix_control.id)
|
||||
|
||||
@@ -87,7 +87,7 @@ void SiS7018_trace(bool force, const char* func, const char *fmt, ...)
|
||||
bigtime_t time = system_time();
|
||||
uint32 msec = time / 1000;
|
||||
uint32 sec = msec / 1000;
|
||||
sprintf(buf_ptr, "%02ld.%02ld.%03ld:",
|
||||
sprintf(buf_ptr, "%02" B_PRIu32 ".%02" B_PRIu32 ".%03" B_PRIu32 ":",
|
||||
sec / 60, sec % 60, msec % 1000);
|
||||
buf_ptr += strlen(buf_ptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user