432 |
vortex_src_persist_convratio(vortex, src, ratio); |
vortex_src_persist_convratio(vortex, src, ratio); |
433 |
} |
} |
434 |
|
|
435 |
int vortex_src_checkratio(vortex_t *vortex, unsigned char src, unsigned int ratio) { |
int vortex_src_checkratio(vortex_t *vortex, unsigned char src, unsigned int desired_ratio) { |
436 |
int temp, lifeboat = 0; |
int hw_ratio, lifeboat = 0; |
437 |
|
|
438 |
do { |
hw_ratio = hwread(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2)); |
439 |
temp = hwread(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2)); |
|
440 |
if (temp == ratio) |
while (hw_ratio != desired_ratio) { |
441 |
break; |
hwwrite(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2), desired_ratio); |
442 |
hwwrite(vortex->mmio, VORTEX_SRC_CONVRATIO + (src << 2), ratio); |
|
443 |
} while ((++lifeboat) > 0x9); |
if ((lifeboat++) > 15){ |
444 |
|
printk(KERN_ERR "Vortex: could not set src-%d to %d\n", src, hw_ratio, desired_ratio); |
445 |
return temp; |
break; |
446 |
|
} |
447 |
|
} |
448 |
|
|
449 |
|
return hw_ratio; |
450 |
} |
} |
451 |
|
|
452 |
void vortex_src_setupchannel(vortex_t *card, unsigned char src, unsigned int cvr, |
void vortex_src_setupchannel(vortex_t *card, unsigned char src, unsigned int cvr, |