• A
    ALSA: hdspm - Fix sync check reporting on RME RayDAT · d1a3c98d
    Adrian Knoth 提交于
    The RayDAT reports the sync status of its inputs in consecutive bit
    positions, so all we do in hdspm_s1_sync_check is to iterate over idx:
    
        status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
    
        lock = (status & (0x1<<idx)) ? 1 : 0;
        sync = (status & (0x100<<idx)) ? 1 : 0;
    
    The index is given in kcontrol->private_value:
    
        HDSPM_SYNC_CHECK("WC SyncCheck", 0),
        HDSPM_SYNC_CHECK("AES SyncCheck", 1),
        HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2),
        HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3),
        HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4),
        HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5),
        HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6),
        HDSPM_SYNC_CHECK("TCO SyncCheck", 7),
        HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8),
    
    The patch corrects the indicated sync flags by passing the proper index
    value to hdspm_s1_sync_check().
    Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
    Signed-off-by: NTakashi Iwai <tiwai@suse.de>
    d1a3c98d
hdspm.c 181.1 KB