Merge amixer and alsactl capabilities and remove templating

BZ: 200396

This is a refactoring and simplification of all alsa plugins.

'mixer control' and 'device opening' capabilities used to be split in amixer
and alsactl plugin types, leading to a convoluted templating and inheritance
model.  It serves little purpose to split the two capabilities and merging them
allows a much simpler model.

Both the 'legacy alsa' and the 'tinyalsa' plugins derive from common base
classes.

Warning: Instead of "ALSACTL" and "AMIXER" plugin types, there is now a single
"ALSA" type (in Subsystem Structure files).  Existing Structure files need to
be updated.

Change-Id: I1f8fd29cbb453e8305d62ee705b437c0a3e7f1c0
Signed-off-by: David Wagner <david.wagner@intel.com>
Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
Tinyalsa: cache the mixer handles

BZ: 200396

Calling mixer_open()/mixer_close() each time we read or write a control is very
expensive (because tinyalsa retrieves a lot of information from the kernel
before it needs them).

Instead, we can call mixer_open() once for each card and cache the handle.

Change-Id: I2a53939f2cab9dc372c99a7d1a508b44c3fb49a6
Signed-off-by: David Wagner <david.wagner@intel.com>
Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
Virtualize array-related methods

This will allow overriding them in derived plugins.

Change-Id: If9795c9d66276080c254dfbc260bdaa5747cac53
Signed-off-by: David Wagner <david.wagner@intel.com>
Replace the 'number of amends' define with a static const

BZ: 200396

This define used to indicate how many mapping keys were 'Amend' keys.  Static
const are preferred to defines.  This commit also actually makes use of this
value when needed.

Change-Id: I0f3c8538fef07b489599ed7db57a3fcd99e319c5
Signed-off-by: David Wagner <david.wagner@intel.com>
Split Tinyalsa plugin logs into multiple lines.

BZ: 208733

There are missing logs in Tinyalsa plugin due to ALOGD,ALOGW... methods size
constraint in display.

Now, Tinyalsa plugin logs are split into multiple lines of 64 characters, so all
logs will be displayed.

Change-Id: I0683651d753342ddc1e1d131768916aba658c37f
Signed-off-by: Riadh Khaldi <riadhx.khaldi@intel.com>
Merge pull request #3 from 01org/align-internal

Align with internal tree

Verified