]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branches 'topic/dai-link' and 'topic/find-dai' of git://git.kernel.org/pub...
authorMark Brown <broonie@kernel.org>
Wed, 20 Apr 2016 16:21:28 +0000 (17:21 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 20 Apr 2016 16:21:28 +0000 (17:21 +0100)
13 files changed:
include/sound/soc.h
include/uapi/sound/asoc.h
sound/soc/intel/boards/broadwell.c
sound/soc/intel/boards/bytcr_rt5640.c
sound/soc/intel/boards/bytcr_rt5651.c
sound/soc/intel/boards/cht_bsw_max98090_ti.c
sound/soc/intel/boards/cht_bsw_rt5645.c
sound/soc/intel/boards/cht_bsw_rt5672.c
sound/soc/intel/boards/haswell.c
sound/soc/intel/boards/skl_nau88l25_max98357a.c
sound/soc/intel/boards/skl_nau88l25_ssm4567.c
sound/soc/intel/boards/skl_rt286.c
sound/soc/soc-topology.c

index 7687e2d4b0e4c4b65be77a4a965865f04ed04fc6..fd7b58a58d6f9c26b484210a237df709e3fb2f4d 100644 (file)
@@ -1002,7 +1002,7 @@ struct snd_soc_dai_link {
         */
        const char *platform_name;
        struct device_node *platform_of_node;
-       int be_id;      /* optional ID for machine driver BE identification */
+       int id; /* optional ID for machine driver link identification */
 
        const struct snd_soc_pcm_stream *params;
        unsigned int num_params;
index c4cc1e40b35c1343595d716b6b5b5e7d894226ce..e4701a3c633187c25a832580eb0af5fe70f2ade4 100644 (file)
 #define SND_SOC_TPLG_STREAM_PLAYBACK   0
 #define SND_SOC_TPLG_STREAM_CAPTURE    1
 
+/* vendor tuple types */
+#define SND_SOC_TPLG_TUPLE_TYPE_UUID   0
+#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1
+#define SND_SOC_TPLG_TUPLE_TYPE_BOOL   2
+#define SND_SOC_TPLG_TUPLE_TYPE_BYTE   3
+#define SND_SOC_TPLG_TUPLE_TYPE_WORD   4
+#define SND_SOC_TPLG_TUPLE_TYPE_SHORT  5
+
 /*
  * Block Header.
  * This header precedes all object and object arrays below.
@@ -132,6 +140,35 @@ struct snd_soc_tplg_hdr {
        __le32 count;           /* number of elements in block */
 } __attribute__((packed));
 
+/* vendor tuple for uuid */
+struct snd_soc_tplg_vendor_uuid_elem {
+       __le32 token;
+       char uuid[16];
+} __attribute__((packed));
+
+/* vendor tuple for a bool/byte/short/word value */
+struct snd_soc_tplg_vendor_value_elem {
+       __le32 token;
+       __le32 value;
+} __attribute__((packed));
+
+/* vendor tuple for string */
+struct snd_soc_tplg_vendor_string_elem {
+       __le32 token;
+       char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
+} __attribute__((packed));
+
+struct snd_soc_tplg_vendor_array {
+       __le32 size;    /* size in bytes of the array, including all elements */
+       __le32 type;    /* SND_SOC_TPLG_TUPLE_TYPE_ */
+       __le32 num_elems;       /* number of elements in array */
+       union {
+               struct snd_soc_tplg_vendor_uuid_elem uuid[0];
+               struct snd_soc_tplg_vendor_value_elem value[0];
+               struct snd_soc_tplg_vendor_string_elem string[0];
+       };
+} __attribute__((packed));
+
 /*
  * Private data.
  * All topology objects may have private data that can be used by the driver or
@@ -139,7 +176,10 @@ struct snd_soc_tplg_hdr {
  */
 struct snd_soc_tplg_private {
        __le32 size;    /* in bytes of private data */
-       char data[0];
+       union {
+               char data[0];
+               struct snd_soc_tplg_vendor_array array[0];
+       };
 } __attribute__((packed));
 
 /*
@@ -383,7 +423,7 @@ struct snd_soc_tplg_pcm {
        __le32 size;            /* in bytes of this structure */
        char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
        char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-       __le32 pcm_id;          /* unique ID - used to match */
+       __le32 pcm_id;          /* unique ID - used to match with DAI link */
        __le32 dai_id;          /* unique ID - used to match */
        __le32 playback;        /* supports playback mode */
        __le32 capture;         /* supports capture mode */
index 3f8a1e10bed02841f6b437d3d4a24615879ca35e..7486a0022fdea1f6e06ff7be167f1b60ee558462 100644 (file)
@@ -201,7 +201,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = {
        {
                /* SSP0 - Codec */
                .name = "Codec",
-               .be_id = 0,
+               .id = 0,
                .cpu_dai_name = "snd-soc-dummy-dai",
                .platform_name = "snd-soc-dummy",
                .no_pcm = 1,
index 032a2e753f0bfbdbee9814af8dd173bf8be51cf4..88efb62439ba3f8b74832729cac15c6365930857 100644 (file)
@@ -304,7 +304,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
                /* back ends */
        {
                .name = "SSP2-Codec",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
index 1c95ccc886c4cdc695b80e12f5960512a9c60b5a..35f591eab3c93111b32508b93afb47b52ea98074 100644 (file)
@@ -267,7 +267,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
        /* back ends */
        {
                .name = "SSP2-Codec",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
index e609f089593a935984c101cb6e78fe7a0966e314..6260df6bd49cb5ed965ed2ca0b317caa4ee5a26a 100644 (file)
@@ -255,7 +255,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
        /* back ends */
        {
                .name = "SSP2-Codec",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
index 2a6f80843bc9656b8303a4b9f1d67e4f9b49df45..0618a7f1025b95aa91eeb7cbb083c1e975e5c910 100644 (file)
@@ -295,7 +295,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
        /* back ends */
        {
                .name = "SSP2-Codec",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
index 2e5347f8f96c449f9fde65dc614f43439acd155b..df9d254baa1876e900ca7a41d5cf749c8493d2c1 100644 (file)
@@ -273,7 +273,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
        {
                /* SSP2 - Codec */
                .name = "SSP2-Codec",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
index 22558572cb9ca12c8ae9e60d940473db35cb2434..863f1d5e2a2c97b9775ff84a9d43d985db9fb9b5 100644 (file)
@@ -156,7 +156,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = {
        {
                /* SSP0 - Codec */
                .name = "Codec",
-               .be_id = 0,
+               .id = 0,
                .cpu_dai_name = "snd-soc-dummy-dai",
                .platform_name = "snd-soc-dummy",
                .no_pcm = 1,
index 72176b79a18d6c61c02afabdcfab6bf5b3f4f932..9cc9240ed7179804e2181537ee6185868e03fa12 100644 (file)
@@ -456,7 +456,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        {
                /* SSP0 - Codec */
                .name = "SSP0-Codec",
-               .be_id = 0,
+               .id = 0,
                .cpu_dai_name = "SSP0 Pin",
                .platform_name = "0000:00:1f.3",
                .no_pcm = 1,
@@ -472,7 +472,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        {
                /* SSP1 - Codec */
                .name = "SSP1-Codec",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "SSP1 Pin",
                .platform_name = "0000:00:1f.3",
                .no_pcm = 1,
@@ -489,7 +489,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "dmic01",
-               .be_id = 2,
+               .id = 2,
                .cpu_dai_name = "DMIC01 Pin",
                .codec_name = "dmic-codec",
                .codec_dai_name = "dmic-hifi",
@@ -501,7 +501,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "iDisp1",
-               .be_id = 3,
+               .id = 3,
                .cpu_dai_name = "iDisp1 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi1",
@@ -512,7 +512,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "iDisp2",
-               .be_id = 4,
+               .id = 4,
                .cpu_dai_name = "iDisp2 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi2",
@@ -523,7 +523,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "iDisp3",
-               .be_id = 5,
+               .id = 5,
                .cpu_dai_name = "iDisp3 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi3",
index 5f1ca99ae9b0d03dc51045af7a3489ee3a20b830..53380b2cb1a876040d6044a7adbea7617d659502 100644 (file)
@@ -505,7 +505,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        {
                /* SSP0 - Codec */
                .name = "SSP0-Codec",
-               .be_id = 0,
+               .id = 0,
                .cpu_dai_name = "SSP0 Pin",
                .platform_name = "0000:00:1f.3",
                .no_pcm = 1,
@@ -523,7 +523,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        {
                /* SSP1 - Codec */
                .name = "SSP1-Codec",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "SSP1 Pin",
                .platform_name = "0000:00:1f.3",
                .no_pcm = 1,
@@ -540,7 +540,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "dmic01",
-               .be_id = 2,
+               .id = 2,
                .cpu_dai_name = "DMIC01 Pin",
                .codec_name = "dmic-codec",
                .codec_dai_name = "dmic-hifi",
@@ -552,7 +552,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "iDisp1",
-               .be_id = 3,
+               .id = 3,
                .cpu_dai_name = "iDisp1 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi1",
@@ -563,7 +563,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "iDisp2",
-               .be_id = 4,
+               .id = 4,
                .cpu_dai_name = "iDisp2 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi2",
@@ -574,7 +574,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
        },
        {
                .name = "iDisp3",
-               .be_id = 5,
+               .id = 5,
                .cpu_dai_name = "iDisp3 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi3",
index 2016397a8e755e5cdeb72b26b270c0203aaec4b9..9e39fc1b89d372f5a121ac5f540810a914305da1 100644 (file)
@@ -375,7 +375,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
        {
                /* SSP0 - Codec */
                .name = "SSP0-Codec",
-               .be_id = 0,
+               .id = 0,
                .cpu_dai_name = "SSP0 Pin",
                .platform_name = "0000:00:1f.3",
                .no_pcm = 1,
@@ -393,7 +393,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
        },
        {
                .name = "dmic01",
-               .be_id = 1,
+               .id = 1,
                .cpu_dai_name = "DMIC01 Pin",
                .codec_name = "dmic-codec",
                .codec_dai_name = "dmic-hifi",
@@ -405,7 +405,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
        },
        {
                .name = "iDisp1",
-               .be_id = 2,
+               .id = 2,
                .cpu_dai_name = "iDisp1 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi1",
@@ -416,7 +416,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
        },
        {
                .name = "iDisp2",
-               .be_id = 3,
+               .id = 3,
                .cpu_dai_name = "iDisp2 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi2",
@@ -427,7 +427,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
        },
        {
                .name = "iDisp3",
-               .be_id = 4,
+               .id = 4,
                .cpu_dai_name = "iDisp3 Pin",
                .codec_name = "ehdaudio0D2",
                .codec_dai_name = "intel-hdmi-hifi3",
index 1cf94d7fb9f4534801b83565227408b594f2ee59..bdbfcef4c319416a8935d4a0382dfd6812c9c132 100644 (file)
@@ -1598,6 +1598,7 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
 
        link->name = pcm->pcm_name;
        link->stream_name = pcm->pcm_name;
+       link->id = pcm->pcm_id;
 
        /* pass control to component driver for optional further init */
        ret = soc_tplg_dai_link_load(tplg, link);