aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 3b8f94af7e27..16ebb60ed3d4 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1279,6 +1279,29 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec,
1279EXPORT_SYMBOL_GPL(snd_soc_dapm_stream_event); 1279EXPORT_SYMBOL_GPL(snd_soc_dapm_stream_event);
1280 1280
1281/** 1281/**
1282 * snd_soc_dapm_device_event - send a device event to the dapm core
1283 * @socdev: audio device
1284 * @event: device event
1285 *
1286 * Sends a device event to the dapm core. The core then makes any
1287 * necessary machine or codec power changes..
1288 *
1289 * Returns 0 for success else error.
1290 */
1291int snd_soc_dapm_device_event(struct snd_soc_device *socdev, int event)
1292{
1293 struct snd_soc_codec *codec = socdev->codec;
1294 struct snd_soc_machine *machine = socdev->machine;
1295
1296 if (machine->dapm_event)
1297 machine->dapm_event(machine, event);
1298 if (codec->dapm_event)
1299 codec->dapm_event(codec, event);
1300 return 0;
1301}
1302EXPORT_SYMBOL_GPL(snd_soc_dapm_device_event);
1303
1304/**
1282 * snd_soc_dapm_set_endpoint - set audio endpoint status 1305 * snd_soc_dapm_set_endpoint - set audio endpoint status
1283 * @codec: audio codec 1306 * @codec: audio codec
1284 * @endpoint: audio signal endpoint (or start point) 1307 * @endpoint: audio signal endpoint (or start point)