From 55aef4508598d59c2baea7e2a3e6dfed415bbfc0 Mon Sep 17 00:00:00 2001 From: Markus Bollinger Date: Fri, 23 Jan 2009 14:45:41 +0100 Subject: ALSA: pcxhr - add support for gpio ports and minor bug fix - add support for gpio ports (2 GPI, 2 GPO) of pcxhr stereo cards - minor bugfixes : allow setting clock to internal by the mixer even if there is no stream (but monitoring) Signed-off-by: Markus Bollinger Signed-off-by: Takashi Iwai --- sound/pci/pcxhr/pcxhr_mixer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sound/pci/pcxhr/pcxhr_mixer.c') diff --git a/sound/pci/pcxhr/pcxhr_mixer.c b/sound/pci/pcxhr/pcxhr_mixer.c index 2436e374586f..fec049344621 100644 --- a/sound/pci/pcxhr/pcxhr_mixer.c +++ b/sound/pci/pcxhr/pcxhr_mixer.c @@ -789,11 +789,15 @@ static int pcxhr_clock_type_put(struct snd_kcontrol *kcontrol, if (mgr->use_clock_type != ucontrol->value.enumerated.item[0]) { mutex_lock(&mgr->setup_mutex); mgr->use_clock_type = ucontrol->value.enumerated.item[0]; - if (mgr->use_clock_type) + rate = 0; + if (mgr->use_clock_type != PCXHR_CLOCK_TYPE_INTERNAL) { pcxhr_get_external_clock(mgr, mgr->use_clock_type, &rate); - else + } else { rate = mgr->sample_rate; + if (!rate) + rate = 48000; + } if (rate) { pcxhr_set_clock(mgr, rate); if (mgr->sample_rate) -- cgit v1.2.3-55-g7522