diff options
author | Pavel Hofman <pavel.hofman@ivitera.com> | 2012-01-05 16:01:56 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-01-08 08:28:32 -0500 |
commit | 219e2cd41b5014c5a6ed4d1748f65f55f74a862f (patch) | |
tree | 56a9972916ce054a27e0d84c0fa8b434a1364fc5 | |
parent | e7848163aa2a649d9065f230fadff80dc3519775 (diff) |
ALSA: ice1724 - External clock item only for cards with SPDIF_IN
Append the external clock item to the clock list only if
the SPDIF_IN capability is defined in the SPDIF register.
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 4dc51246d1ae..9e18d3a3f038 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -1825,7 +1825,12 @@ static int snd_vt1724_pro_internal_clock_info(struct snd_kcontrol *kcontrol, | |||
1825 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 1825 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
1826 | uinfo->count = 1; | 1826 | uinfo->count = 1; |
1827 | 1827 | ||
1828 | uinfo->value.enumerated.items = hw_rates_count + ice->ext_clock_count; | 1828 | /* internal clocks */ |
1829 | uinfo->value.enumerated.items = hw_rates_count; | ||
1830 | /* external clocks */ | ||
1831 | if (ice->force_rdma1 || | ||
1832 | (ice->eeprom.data[ICE_EEP2_SPDIF] & VT1724_CFG_SPDIF_IN)) | ||
1833 | uinfo->value.enumerated.items += ice->ext_clock_count; | ||
1829 | /* upper limit - keep at top */ | 1834 | /* upper limit - keep at top */ |
1830 | if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) | 1835 | if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) |
1831 | uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; | 1836 | uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; |