aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2006-02-02 01:56:54 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:28:15 -0500
commite957ebf164e880ddb0c057418195db47d013c4ac (patch)
tree63f4315f81246869a8eb0da48be4c33315cdb7aa /sound/pci/ice1712
parent2ba8c15c738b64b4d3acaace1e19750362ff2b69 (diff)
[ALSA] ice1712 & cs8427 - fix problem for S/PDIF input setup
Modules: I2C cs8427,ICE1712 driver See ALSA bug#1785 for more details. Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r--sound/pci/ice1712/ice1712.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index 3156a3132990..6682e1fc1449 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -317,7 +317,6 @@ static void snd_ice1712_set_gpio_data(struct snd_ice1712 *ice, unsigned int val)
317 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */ 317 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */
318} 318}
319 319
320
321/* 320/*
322 * 321 *
323 * CS8427 interface 322 * CS8427 interface
@@ -397,6 +396,20 @@ int __devinit snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr)
397 return 0; 396 return 0;
398} 397}
399 398
399static void snd_ice1712_set_input_clock_source(struct snd_ice1712 *ice, int spdif_is_master)
400{
401 /* change CS8427 clock source too */
402 if (ice->cs8427)
403 snd_ice1712_cs8427_set_input_clock(ice, spdif_is_master);
404 /* notify ak4524 chip as well */
405 if (spdif_is_master) {
406 unsigned int i;
407 for (i = 0; i < ice->akm_codecs; i++) {
408 if (ice->akm[i].ops.set_rate_val)
409 ice->akm[i].ops.set_rate_val(&ice->akm[i], 0);
410 }
411 }
412}
400 413
401/* 414/*
402 * Interrupt handler 415 * Interrupt handler
@@ -1857,20 +1870,8 @@ static int snd_ice1712_pro_internal_clock_put(struct snd_kcontrol *kcontrol,
1857 spin_unlock_irq(&ice->reg_lock); 1870 spin_unlock_irq(&ice->reg_lock);
1858 1871
1859 if ((oval & ICE1712_SPDIF_MASTER) != 1872 if ((oval & ICE1712_SPDIF_MASTER) !=
1860 (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER)) { 1873 (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER))
1861 /* change CS8427 clock source too */ 1874 snd_ice1712_set_input_clock_source(ice, is_spdif_master(ice));
1862 if (ice->cs8427) {
1863 snd_ice1712_cs8427_set_input_clock(ice, is_spdif_master(ice));
1864 }
1865 /* notify ak4524 chip as well */
1866 if (is_spdif_master(ice)) {
1867 unsigned int i;
1868 for (i = 0; i < ice->akm_codecs; i++) {
1869 if (ice->akm[i].ops.set_rate_val)
1870 ice->akm[i].ops.set_rate_val(&ice->akm[i], 0);
1871 }
1872 }
1873 }
1874 1875
1875 return change; 1876 return change;
1876} 1877}
@@ -2736,6 +2737,8 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2736 } 2737 }
2737 } 2738 }
2738 2739
2740 snd_ice1712_set_input_clock_source(ice, 0);
2741
2739 sprintf(card->longname, "%s at 0x%lx, irq %i", 2742 sprintf(card->longname, "%s at 0x%lx, irq %i",
2740 card->shortname, ice->port, ice->irq); 2743 card->shortname, ice->port, ice->irq);
2741 2744