]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ASoC: Intel: detect audio routing with CHAN package
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Sun, 13 Nov 2016 00:07:45 +0000 (18:07 -0600)
committerMark Brown <broonie@kernel.org>
Sun, 13 Nov 2016 09:19:54 +0000 (09:19 +0000)
commit64e84305cb936024a9862c48f61539fdad649a22
tree5ed506ebdb09a204018c38c2def7bbe7aaebfe55
parent3421894765a345c6919b22cdda606c2ba1aab2eb
ASoC: Intel: detect audio routing with CHAN package

Baytrail-CR devices usually expose information in the DSDT
which can be used to auto-detect AIF1/AIF2 connections.
The CHAN package contains two integers, the first one describes
the AIF number (1: AIF1, 2: AIF2) and the second the MCLK
value (ignored in this patch)

For example the following information is found in Lenovo 100s:

Device (RTEK) {
[...]
    Name (CHAN, Package (0x02)
    {
        One,
        0x017D7840
    })

While on Asus T100TAF the package values are:

    Name (CHAN, Package (0x02)
    {
        0x02,
        0x017D7840
    })

This patch relies on the new common routine to extract
a package exposed by a device indexed with the HID value.
The CHAN package contents are queried from the machine driver
and stored in a structure.

If this auto-detection fails (missing or bad package in the
BIOS), the routing falls back to SSP0-AIF2.

Note that quirks may still be needed to support mono speakers
or microphone, but this should reduce the number of issues with
Baytrail significantly.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcr_rt5640.c