summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-24 14:31:46 +0100
committerTakashi Iwai <tiwai@suse.de>2011-11-26 10:19:44 +0100
commit01b65bfb4f8cd45b0d44547c961ef59a0bcf74be (patch)
treeb297e5611802e0734a263718f59434d3e436e6c9 /sound/pci/hda/hda_codec.c
parentb37c0096b448d099d304bb47c4eada9117dba4cf (diff)
downloadop-kernel-dev-01b65bfb4f8cd45b0d44547c961ef59a0bcf74be.zip
op-kernel-dev-01b65bfb4f8cd45b0d44547c961ef59a0bcf74be.tar.gz
ALSA: hda - Supports more audio streams
So far, the driver supports up to 10 streams. This is a restriction in hda_intel.c and hda_codec.c: in the former, the fixed array size limits the amount, and in the latter, the fixed device-number assignment table (in get_empty_pcm_device()) limits the possibility. This patch reduces the restriction by - using linked list for managing PCM instances in hda_intel.c, and - assigning non-fixed device numbers for the extra devices Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 4562e9d..4463f9a 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3850,6 +3850,12 @@ static int get_empty_pcm_device(struct hda_bus *bus, int type)
if (!test_and_set_bit(audio_idx[type][i], bus->pcm_dev_bits))
return audio_idx[type][i];
+ /* non-fixed slots starting from 10 */
+ for (i = 10; i < 32; i++) {
+ if (!test_and_set_bit(i, bus->pcm_dev_bits))
+ return i;
+ }
+
snd_printk(KERN_WARNING "Too many %s devices\n",
snd_hda_pcm_type_name[type]);
return -EAGAIN;
OpenPOWER on IntegriCloud