tinyhostless: Allow loopback between devices.

Update tinyhostless to allow it to read from the capture device
and play to the playback device. This loopback mode makes it
compatible with devices where there is no hardware-loopback
(hostless) mode available.

Also:
- Return error codes when there is an error.
- Reduce default period size.
- Initialize memory in PCM configuration.
- Check PCM configuration parameter validity; provide range to
  user.
- Support 24-bit.
- Exit on SIGHUP, and SIGTERM also.

Bug: 62277051
Test: Tinyhostless functions with hardware-loopback enabled.
      Tinyhostless functions with loopback mode enabled on any
      playback and capture device pair.

Change-Id: Iaf6c9dddf94f9b6ac19b103d755fa6e772edbf77
1 file changed