Revert "CRAS: Deduplicate snd_pcm_open calls when opening a device."

This reverts commit 70182dd089ce9646f371ce0188ce4423d7f64f6a.

Reason for revert: broke the external mic on cyan and celes

Original change's description:
> CRAS: Deduplicate snd_pcm_open calls when opening a device.
>
> The current open device flow includes several functions like
> cras_alsa_fill_properties and update_channel_layout. They are used only
> once in the flow but each calls snd_pcm_open and then snd_pcm_close the
> device. Since snd_pcm_open is one of the most time-consuming hardware
> operations, the CL extracts the snd_pcm_open calls to the beginning of
> the device open flow to save time.
>
> 1. Update cras_alsa_fill_properties and update_channel_layout to take a
>    handle as argument and do not invoke snd_pcm_open.
> 2. Rename existing open_dev functions to configure_dev. open_dev is now
>    called at the beginning of the device open flow and invokes the
>    snd_pcm_open call.
> 3. Put open_dev, cras_iodev_set_format, and configure_dev inside the
>    cras_iodev_open function.
>
> BUG=b:719812
> TEST=make check and tested on reef
>      Cuts time to open speakers from 78ms to 42ms
>
> Change-Id: I9b161217def5e87bf892f4ca8148f07bed5e71a5
> Reviewed-on: https://chromium-review.googlesource.com/505974
> Commit-Ready: Chinyue Chen <chinyue@chromium.org>
> Tested-by: Chinyue Chen <chinyue@chromium.org>
> Reviewed-by: Dylan Reid <dgreid@chromium.org>
>

BUG=b:719812

Change-Id: I22eb2fc70b4a5003a861be62d31bc2337b9918c3
Reviewed-on: https://chromium-review.googlesource.com/511982
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
21 files changed