]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: hda - Fix bdl_pos_adj value for ATI SB chipsets
authorTakashi Iwai <tiwai@suse.de>
Tue, 10 Jun 2008 15:53:35 +0000 (17:53 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 13 Jun 2008 14:34:25 +0000 (16:34 +0200)
ATI SB controllers seem to report the DMA ahead in the amount of FIFO.
Thus bdl_pos_adj should be 32 for them as default.

Also, the default value is set to -1, which means to make the driver
to choose the appropriate value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/hda/hda_intel.c

index ddae3c479a8883195805a899bc5a16e41e37a620..9b2dc0669b94f4606b68a4e561ad889b40fa25b3 100644 (file)
@@ -55,7 +55,7 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
 static char *model[SNDRV_CARDS];
 static int position_fix[SNDRV_CARDS];
-static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
+static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
 static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
 static int single_cmd;
 static int enable_msi;
@@ -2013,6 +2013,18 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
 
        chip->single_cmd = single_cmd;
 
+       if (bdl_pos_adj[dev] < 0) {
+               switch (chip->driver_type) {
+               case AZX_DRIVER_ATI:
+               case AZX_DRIVER_ATIHDMI:
+                       bdl_pos_adj[dev] = 32;
+                       break;
+               default:
+                       bdl_pos_adj[dev] = 1;
+                       break;
+               }
+       }
+
 #if BITS_PER_LONG != 64
        /* Fix up base address on ULI M5461 */
        if (chip->driver_type == AZX_DRIVER_ULI) {