aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-08-30 02:58:37 -0400
committerJaroslav Kysela <perex@suse.cz>2005-08-30 02:58:37 -0400
commitd568121ce3151c36cc4718dd4e977f217c6144c2 (patch)
treeee61f946a485c7cbe74c888d53ea7775aeef7444 /sound/core
parent68c339d9068502347015ce462530ec54c4d841e4 (diff)
[PATCH] Assign device pointer to OSS devices
Add register_sound_special_device() function to allow assignment of device pointer to a specific OSS device for HAL. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/sound_oss.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index de39d212bc15..e401c6703297 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -98,6 +98,7 @@ int snd_register_oss_device(int type, snd_card_t * card, int dev, snd_minor_t *
98 int cidx = SNDRV_MINOR_OSS_CARD(minor); 98 int cidx = SNDRV_MINOR_OSS_CARD(minor);
99 int track2 = -1; 99 int track2 = -1;
100 int register1 = -1, register2 = -1; 100 int register1 = -1, register2 = -1;
101 struct device *carddev = NULL;
101 102
102 if (minor < 0) 103 if (minor < 0)
103 return minor; 104 return minor;
@@ -121,11 +122,13 @@ int snd_register_oss_device(int type, snd_card_t * card, int dev, snd_minor_t *
121 track2 = SNDRV_MINOR_OSS(cidx, SNDRV_MINOR_OSS_DMMIDI1); 122 track2 = SNDRV_MINOR_OSS(cidx, SNDRV_MINOR_OSS_DMMIDI1);
122 break; 123 break;
123 } 124 }
124 register1 = register_sound_special(reg->f_ops, minor); 125 if (card)
126 carddev = card->dev;
127 register1 = register_sound_special_device(reg->f_ops, minor, carddev);
125 if (register1 != minor) 128 if (register1 != minor)
126 goto __end; 129 goto __end;
127 if (track2 >= 0) { 130 if (track2 >= 0) {
128 register2 = register_sound_special(reg->f_ops, track2); 131 register2 = register_sound_special_device(reg->f_ops, track2, carddev);
129 if (register2 != track2) 132 if (register2 != track2)
130 goto __end; 133 goto __end;
131 } 134 }