diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:35:51 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:35:51 +0100 |
commit | ff4fc3656e489ed6ee575959b0510286aefe1e20 (patch) | |
tree | bd68ee19f3e9ab1ed825be901fb7a010d439ca9b /sound/aoa/soundbus | |
parent | e0d2054fd3cf167395390dc1758644486c782707 (diff) | |
parent | 5f17e79cdf530b1a6090c65730e5656ac9c19eaa (diff) |
Merge branch 'topic/aoa' into for-linus
Diffstat (limited to 'sound/aoa/soundbus')
-rw-r--r-- | sound/aoa/soundbus/i2sbus/core.c | 22 |
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 @@ /* * i2sbus driver * - * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> + * Copyright 2006-2008 Johannes Berg <johannes@sipsolutions.net> * * GPL v2, can be found in COPYING. */ @@ -186,13 +186,25 @@ static int i2sbus_add_dev(struct macio_dev *macio, } } if (i == 1) { - const u32 *layout_id = - of_get_property(sound, "layout-id", NULL); - if (layout_id) { - layout = *layout_id; + const u32 *id = of_get_property(sound, "layout-id", NULL); + + if (id) { + layout = *id; snprintf(dev->sound.modalias, 32, "sound-layout-%d", layout); ok = 1; + } else { + id = of_get_property(sound, "device-id", NULL); + /* + * We probably cannot handle all device-id machines, + * so restrict to those we do handle for now. + */ + if (id && (*id == 22 || *id == 14 || *id == 35)) { + snprintf(dev->sound.modalias, 32, + "aoa-device-id-%d", *id); + ok = 1; + layout = -1; + } } } /* for the time being, until we can handle non-layout-id |