summaryrefslogtreecommitdiff
path: root/sound/pci/ice1712
diff options
context:
space:
mode:
authorPavel Hofman <pavel.hofman@ivitera.com>2012-01-06 01:01:56 +0400
committerTakashi Iwai <tiwai@suse.de>2012-01-08 17:28:32 +0400
commit219e2cd41b5014c5a6ed4d1748f65f55f74a862f (patch)
tree56a9972916ce054a27e0d84c0fa8b434a1364fc5 /sound/pci/ice1712
parente7848163aa2a649d9065f230fadff80dc3519775 (diff)
downloadlinux-219e2cd41b5014c5a6ed4d1748f65f55f74a862f.tar.xz
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>
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r--sound/pci/ice1712/ice1724.c7
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,
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
- uinfo->value.enumerated.items = hw_rates_count + ice->ext_clock_count;
+ /* internal clocks */
+ uinfo->value.enumerated.items = hw_rates_count;
+ /* external clocks */
+ if (ice->force_rdma1 ||
+ (ice->eeprom.data[ICE_EEP2_SPDIF] & VT1724_CFG_SPDIF_IN))
+ uinfo->value.enumerated.items += ice->ext_clock_count;
/* upper limit - keep at top */
if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;