aboutsummaryrefslogtreecommitdiffstats
path: root/sound/aoa/soundbus
diff options
context:
space:
mode:
Diffstat (limited to 'sound/aoa/soundbus')
-rw-r--r--sound/aoa/soundbus/i2sbus/core.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index be468edf3ec..418c84c99d6 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * i2sbus driver 2 * i2sbus driver
3 * 3 *
4 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 4 * Copyright 2006-2008 Johannes Berg <johannes@sipsolutions.net>
5 * 5 *
6 * GPL v2, can be found in COPYING. 6 * GPL v2, can be found in COPYING.
7 */ 7 */
@@ -186,13 +186,25 @@ static int i2sbus_add_dev(struct macio_dev *macio,
186 } 186 }
187 } 187 }
188 if (i == 1) { 188 if (i == 1) {
189 const u32 *layout_id = 189 const u32 *id = of_get_property(sound, "layout-id", NULL);
190 of_get_property(sound, "layout-id", NULL); 190
191 if (layout_id) { 191 if (id) {
192 layout = *layout_id; 192 layout = *id;
193 snprintf(dev->sound.modalias, 32, 193 snprintf(dev->sound.modalias, 32,
194 "sound-layout-%d", layout); 194 "sound-layout-%d", layout);
195 ok = 1; 195 ok = 1;
196 } else {
197 id = of_get_property(sound, "device-id", NULL);
198 /*
199 * We probably cannot handle all device-id machines,
200 * so restrict to those we do handle for now.
201 */
202 if (id && (*id == 22 || *id == 14 || *id == 35)) {
203 snprintf(dev->sound.modalias, 32,
204 "aoa-device-id-%d", *id);
205 ok = 1;
206 layout = -1;
207 }
196 } 208 }
197 } 209 }
198 /* for the time being, until we can handle non-layout-id 210 /* for the time being, until we can handle non-layout-id