configmgr: Fix codec_probe to handle relative XML file paths consistently
configmgr: Fix codec_probe to handle relative XML file paths consistently

If the target XML wasn't an absolute path, the actual location it would be
loaded from was always relative to /system/etc or /vendor/etc/. On GNU/Linux
builds this was useless as these directories don't exist and have no relation
to where the root XML was loaded. On Android this made it awkward and confusing
to group XMLs into a subdirectory of etc/, or an entirely different location.

The reasonable expectation is that if the path to the new XML is not
absolute, it was intended to be relative to the location of the current XML.
Thus for this:

    <case name="foo" file="some_new_file.xml"/>

the author must have intended that "some_new_file.xml" is in the same
directory as the parent XML file containing the <case>, and that:

    <case name="foo" file="../some_new_file.xml"/>

is therefore in the directory above the one containing the current XML file.

If the path to the root XML file, as passed to init_audio_config(), is not
absolute, the behaviour differs between GNU/Linux and Android:

- On typical GNU/Linux type systems it is relative to getcwd(), which is the
  normal expected behaviour.

- On Android, to preserve existing behaviour it is assumed to be in the etc
  directory, either /vendor/etc or /system/etc (depending on the definition of
  BOARD_USES_VENDORIMAGE).

Change-Id: Ic6a4bafa1c8cd16a78c999b07181cf6b6539f65a
Signed-off-by: Richard Fitzgerald <22ee0097135072451429b5ac45630d52779cd49b@opensource.cirrus.com>

CirrusLogic/tinyhal,CirrusLogic/tinyhal,CirrusLogic/tinyhal