CHROMIUM: ASoC: samsung i2s - Don't setup if already active.
If the dai is already running when setup is called, skip setup. Setting
up again caused set_sysclk to set rclk_srcrate to other->rclk_srcrate,
other would often be set to the default of 44.1. Playing a 48k stream
then adding a 48k capture stream would lead to both streams set to 44.1
(The value of other->rclk_srcrate).
Similarly in shutdown, if either playback or capture are still active,
return instead of turning off the clocks.
BUG=chrome-os-partner:13769, 13749
TEST=aplay -Dhw:0 <any 48k wav file>, then arecord -Dhw:0 -f dat
/tmp/asdf.wav. Make sure audio continues from aplay and is captured by
arecord, before this change aplay would stop and arecord would capture
silence.
Gmail settings, make sure microphone progress bar moves when you talk.
Change-Id: I1dd02854e234d23ac25ad686c7603e4bc9265b4e
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32477
Reviewed-by: Olof Johansson <olofj@chromium.org>