From 8b7edfd18851e517b0ac0a23875530bc3ca6eddf Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Fri, 3 Nov 2017 10:24:25 +0900 Subject: pmd: fixed command O, thanks pedipanol and pigdevil2010 for reporting! --- fmdriver/fmdriver_pmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fmdriver') diff --git a/fmdriver/fmdriver_pmd.c b/fmdriver/fmdriver_pmd.c index f5322fa..c7cdbfd 100644 --- a/fmdriver/fmdriver_pmd.c +++ b/fmdriver/fmdriver_pmd.c @@ -4025,7 +4025,7 @@ static void pmd_cmdb8_slottl( struct pmd_part *part ){ uint8_t data = pmd_part_cmdload(pmd, part); - uint8_t slotmask = data & 0xf & (part->fm_slotmask>>4); + uint8_t slotmask = (data & 0xf) & (part->fm_slotmask>>4); uint8_t val = pmd_part_cmdload(pmd, part); bool masked = pmd_part_masked(part); bool relative = data & 0x80; @@ -4043,7 +4043,8 @@ static void pmd_cmdb8_slottl( part->fm_tone_tl[slottable[s]] = vol; } if (!masked) { - pmd_reg_write(work, pmd, 0x3f+pmd->proc_ch+8*s, part->fm_tone_tl[slottable[s]]); + pmd_reg_write(work, pmd, + 0x3f+pmd->proc_ch+4*slottable[s], part->fm_tone_tl[slottable[s]]); } } } -- cgit v1.2.3