CRAS: alsa_io - Separate volume and mute ops

Now that we have ramp in alsa_io, we should let ramp finish first and
then set mute control after that.
Putting volume and mute control together causes mute control to be
turned to mute state before ramp is finished.
1. System state has mute = 1 and volume = 0
2. set_alsa_volume is called. It sees mute in system state is 1 so it
   set mute state to muted.
To avoid above problem, we should separate set_volume and set_mute ops
of alsa_io.
This simplifies each ops. Now set_volume only changes
volume, and set_mute only changes mute state.

BUG=chromium:669662
TEST=make check
TEST=On samus, check ramping down works fine when pressing volume down
  quickly and repeatedly until 0.
TEST=On samus, play a sine tone in youtube. Press volume down until
  volume is the lowest but not zero. Press "down down down up" very
  quickly. There will be no pop noise.

Change-Id: I722367f9577653b0b05f56965ea61038d227cc91
Reviewed-on: https://chromium-review.googlesource.com/423447
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2 files changed