ALSA: hda - allow to mask a buggy stream DMA by setting it as opened
PATCH 1/2 ALSA: hda - allow to mask a buggy stream DMA by setting it as opened
From: Mengdong Lin <[email protected]>
The function azx_init_stream() can accept a bit mask parameter. If the bit for a stream DMA is set, that stream device will be masked by setting it as opened and so it will never be assigned to any PCM stream.
Signed-off-by Mengdong Lin <[email protected]>
sound/pci/hda/hda_controller.c +4 -1
@@ -2004,7 +2004,7 @@ EXPORT_SYMBOL_GPL(azx_mixer_create);/* initialize SD streams */ -int azx_init_stream (struct azx *chip) +int azx_init_stream (struct azx *chip,unsigned int mask) {int i;
@@ -2022,6 +2022,9 @@ int azx_init_stream(struct azx *chip)/* stream tag: must be non-zero and unique */ azx_dev->index = i; azx_dev->stream_tag = i +1 ; +/* mask a buggy stream DMA by setting it as opened */ +if (mask & (1 << i)) + azx_dev->opened =1 ; }return 0 ;
sound/pci/hda/hda_controller.h +1 -1
@@ -48,6 +48,6 @@ int azx_codec_create(struct azx *chip, const char *model, int *power_save_to);int azx_codec_configure (struct azx *chip);int azx_mixer_create (struct azx *chip); -int azx_init_stream (struct azx *chip); +int azx_init_stream (struct azx *chip,unsigned int mask);#endif /* __SOUND_HDA_CONTROLLER_H */
sound/pci/hda/hda_intel.c +1 -1
@@ -1364,7 +1364,7 @@ static int azx_first_init(struct azx *chip)return err;/* initialize streams */ -azx_init_stream (chip); +azx_init_stream (chip,0 );/* initialize chip */ azx_init_pci (chip);
Signature · 1 line
1.8.1.2