ALSA: hdspm - Fix S/PDIF Sync status and frequency on RME AIO
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>
Fri, 5 Jul 2013 09:28:03 +0000 (11:28 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 5 Jul 2013 12:51:12 +0000 (14:51 +0200)
This is a left-over mistake from old code, the correct register offset is
provided in kcontrol->private_value, not in the index.
Cf. RayDAT case, where it has already been corrected.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/rme9652/hdspm.c

index ad41636..06e69de 100644 (file)
@@ -2312,7 +2312,7 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
                default:
                        ucontrol->value.enumerated.item[0] =
                                hdspm_get_s1_sample_rate(hdspm,
-                                               ucontrol->id.index-1);
+                                               kcontrol->private_value-1);
                }
                break;
 
@@ -3930,7 +3930,8 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol,
                case 5: /* SYNC IN */
                        val = hdspm_sync_in_sync_check(hdspm); break;
                default:
-                       val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1);
+                       val = hdspm_s1_sync_check(hdspm,
+                                       kcontrol->private_value-1);
                }
                break;