aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/ice1712.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ice1712/ice1712.c')
-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