diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-26 07:45:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-27 04:48:42 -0400 |
commit | b047e1cce8fe32475ab61846772943a5e4c0a908 (patch) | |
tree | 9d04d8101d161b96f96c2e2e5bd03900011828ec /include/sound | |
parent | b49dff8cb61cd4715991612e2eb6905b73a0be78 (diff) |
ASoC: ac97: Support multi-platform AC'97
Currently we can only have a single platform built in with AC'97 support
due to the use of a global variable to provide the bus operations. Fix
this by making that variable a pointer and having the bus drivers set the
operations prior to registering.
This is not a particularly good or nice approach but it avoids blocking
multiplatform and a real fix involves fixing the fairly deep problems
with AC'97 support - we should be converting it to a real bus.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 85c15226103b..6eabee7ec15a 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -340,7 +340,7 @@ struct snd_soc_jack_gpio; | |||
340 | 340 | ||
341 | typedef int (*hw_write_t)(void *,const char* ,int); | 341 | typedef int (*hw_write_t)(void *,const char* ,int); |
342 | 342 | ||
343 | extern struct snd_ac97_bus_ops soc_ac97_ops; | 343 | extern struct snd_ac97_bus_ops *soc_ac97_ops; |
344 | 344 | ||
345 | enum snd_soc_control_type { | 345 | enum snd_soc_control_type { |
346 | SND_SOC_I2C = 1, | 346 | SND_SOC_I2C = 1, |
@@ -467,6 +467,8 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, | |||
467 | struct snd_ac97_bus_ops *ops, int num); | 467 | struct snd_ac97_bus_ops *ops, int num); |
468 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | 468 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); |
469 | 469 | ||
470 | int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops); | ||
471 | |||
470 | /* | 472 | /* |
471 | *Controls | 473 | *Controls |
472 | */ | 474 | */ |