]> err.no Git - linux-2.6/commitdiff
[PATCH] v4l: 665: fix for problem with audio register setup via dsp access
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Wed, 9 Nov 2005 05:36:36 +0000 (21:36 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 9 Nov 2005 15:56:10 +0000 (07:56 -0800)
- Fix for problem with audio register setup via DSP access

Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/video/saa7134/saa7134-core.c

index e5e36f3c6250cd534bc5cc79e30de08363ef16c4..109c815c5e6c903500b54322490fda33eeff1549 100644 (file)
@@ -646,14 +646,6 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
                saa7134_ts_init1(dev);
        saa7134_input_init1(dev);
 
-       switch (dev->pci->device) {
-       case PCI_DEVICE_ID_PHILIPS_SAA7134:
-       case PCI_DEVICE_ID_PHILIPS_SAA7133:
-       case PCI_DEVICE_ID_PHILIPS_SAA7135:
-               saa7134_oss_init1(dev);
-               break;
-       }
-
        /* RAM FIFO config */
        saa_writel(SAA7134_FIFO_SIZE, 0x08070503);
        saa_writel(SAA7134_THRESHOULD,0x02020202);
@@ -668,6 +660,21 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
                   SAA7134_MAIN_CTRL_ESFE  |
                   SAA7134_MAIN_CTRL_EBDAC);
 
+       /*
+        * Initialize OSS _after_ enabling audio clock PLL and audio processing.
+        * OSS initialization writes to registers via the audio DSP; these
+        * writes will fail unless the audio clock has been started.  At worst,
+        * audio will not work.
+        */
+
+       switch (dev->pci->device) {
+       case PCI_DEVICE_ID_PHILIPS_SAA7134:
+       case PCI_DEVICE_ID_PHILIPS_SAA7133:
+       case PCI_DEVICE_ID_PHILIPS_SAA7135:
+               saa7134_oss_init1(dev);
+               break;
+       }
+
        /* enable peripheral devices */
        saa_writeb(SAA7134_SPECIAL_MODE, 0x01);