Skip to content

Commit

Permalink
ALSA: hdspm - Also report autosync_sample_rate on MADI and MADIface
Browse files Browse the repository at this point in the history
MADI and MADIface used to report the autosync_sample_rate. This
functionality was lost in commit
0dca179, this commit now adds it back.

Signed-off-by: Adrian Knoth <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
adiknoth authored and tiwai committed Oct 20, 2012
1 parent d681dea commit b8812c5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions sound/pci/rme9652/hdspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2225,6 +2225,21 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
break;
}
break;

case MADI:
case MADIface:
{
int rate = hdspm_external_sample_rate(hdspm);
int i, selected_rate = 0;
for (i = 1; i < 10; i++)
if (HDSPM_bit2freq(i) == rate) {
selected_rate = i;
break;
}
ucontrol->value.enumerated.item[0] = selected_rate;
}
break;

default:
break;
}
Expand Down Expand Up @@ -4450,6 +4465,7 @@ static struct snd_kcontrol_new snd_hdspm_controls_madi[] = {
HDSPM_PREF_SYNC_REF("Preferred Sync Reference", 0),
HDSPM_AUTOSYNC_REF("AutoSync Reference", 0),
HDSPM_SYSTEM_SAMPLE_RATE("System Sample Rate", 0),
HDSPM_AUTOSYNC_SAMPLE_RATE("External Rate", 0),
HDSPM_SYNC_CHECK("WC SyncCheck", 0),
HDSPM_SYNC_CHECK("MADI SyncCheck", 1),
HDSPM_SYNC_CHECK("TCO SyncCHeck", 2),
Expand Down

0 comments on commit b8812c5

Please sign in to comment.