aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_intel.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index fa4442e8e1a4..d3bd3e748067 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -121,8 +121,8 @@ module_param(power_save_controller, bool, 0644);
121MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode."); 121MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode.");
122#endif 122#endif
123 123
124static bool align_buffer_size = 1; 124static int align_buffer_size = -1;
125module_param(align_buffer_size, bool, 0644); 125module_param(align_buffer_size, bint, 0644);
126MODULE_PARM_DESC(align_buffer_size, 126MODULE_PARM_DESC(align_buffer_size,
127 "Force buffer and period sizes to be multiple of 128 bytes."); 127 "Force buffer and period sizes to be multiple of 128 bytes.");
128 128
@@ -515,6 +515,7 @@ enum {
515#define AZX_DCAPS_SYNC_WRITE (1 << 19) /* sync each cmd write */ 515#define AZX_DCAPS_SYNC_WRITE (1 << 19) /* sync each cmd write */
516#define AZX_DCAPS_OLD_SSYNC (1 << 20) /* Old SSYNC reg for ICH */ 516#define AZX_DCAPS_OLD_SSYNC (1 << 20) /* Old SSYNC reg for ICH */
517#define AZX_DCAPS_BUFSIZE (1 << 21) /* no buffer size alignment */ 517#define AZX_DCAPS_BUFSIZE (1 << 21) /* no buffer size alignment */
518#define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */
518 519
519/* quirks for ATI SB / AMD Hudson */ 520/* quirks for ATI SB / AMD Hudson */
520#define AZX_DCAPS_PRESET_ATI_SB \ 521#define AZX_DCAPS_PRESET_ATI_SB \
@@ -527,7 +528,8 @@ enum {
527 528
528/* quirks for Nvidia */ 529/* quirks for Nvidia */
529#define AZX_DCAPS_PRESET_NVIDIA \ 530#define AZX_DCAPS_PRESET_NVIDIA \
530 (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI) 531 (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\
532 AZX_DCAPS_ALIGN_BUFSIZE)
531 533
532static char *driver_short_names[] __devinitdata = { 534static char *driver_short_names[] __devinitdata = {
533 [AZX_DRIVER_ICH] = "HDA Intel", 535 [AZX_DRIVER_ICH] = "HDA Intel",
@@ -2774,9 +2776,16 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2774 } 2776 }
2775 2777
2776 /* disable buffer size rounding to 128-byte multiples if supported */ 2778 /* disable buffer size rounding to 128-byte multiples if supported */
2777 chip->align_buffer_size = align_buffer_size; 2779 if (align_buffer_size >= 0)
2778 if (chip->driver_caps & AZX_DCAPS_BUFSIZE) 2780 chip->align_buffer_size = !!align_buffer_size;
2779 chip->align_buffer_size = 0; 2781 else {
2782 if (chip->driver_caps & AZX_DCAPS_BUFSIZE)
2783 chip->align_buffer_size = 0;
2784 else if (chip->driver_caps & AZX_DCAPS_ALIGN_BUFSIZE)
2785 chip->align_buffer_size = 1;
2786 else
2787 chip->align_buffer_size = 1;
2788 }
2780 2789
2781 /* allow 64bit DMA address if supported by H/W */ 2790 /* allow 64bit DMA address if supported by H/W */
2782 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) 2791 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))