greybus: audio: add runtime pm to enumerated control and DAPM widget
authorDavid Lin <dtwlin@google.com>
Mon, 25 Jul 2016 23:29:20 +0000 (16:29 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 27 Jul 2016 03:58:37 +0000 (20:58 -0700)
commit9d3717f71c22c4f39723f18ed094c552f4b73146
tree29c04b17083806b79cf14a48f1738ce23c1f10a3
parent7c4a0edb38ba734bd89efbda4262698a58839c26
greybus: audio: add runtime pm to enumerated control and DAPM widget

There's an issue that the userspace is not able to control both the
enumerated control and DAPM widget when audio bundle is in the SUSPEND
state. This patch fixes the issue by adding pm_runtime_get/put() calls
for the both controls.

Testing Done:
 - Use tinymix to get and put both enumerated control and DAPM widget as
   the followings, and observe audio bundle is able to wake up from
   suspend.

$ tinymix "GB 3 PB source" 1
$ tinymix "GB 3 PB source"
GB 3 PB source: AIF1 >AIF2

$ tinymix "GB 3 AIF1_RX MUX" 2
$ tinymix "GB 3 AIF1_RX MUX"
GB 3 AIF1_RX MUX: Stereo Left >Right

Reported-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Signed-off-by: David Lin <dtwlin@google.com>
Reviewed-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio_topology.c