get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2222209/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2222209,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222209/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260410200530.171323-3-piyushpatle228@gmail.com/",
    "project": {
        "id": 21,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/21/?format=api",
        "name": "Linux Tegra Development",
        "link_name": "linux-tegra",
        "list_id": "linux-tegra.vger.kernel.org",
        "list_email": "linux-tegra@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260410200530.171323-3-piyushpatle228@gmail.com>",
    "date": "2026-04-10T20:05:23",
    "name": "[v3,2/2] ASoC: tegra210_amx: simplify byte map get/put logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "746f47b7ada98882f9db3ac5af13de1c9516e6d5",
    "submitter": {
        "id": 92665,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/92665/?format=api",
        "name": "Piyush Patle",
        "email": "piyushpatle228@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260410200530.171323-3-piyushpatle228@gmail.com/mbox/",
    "series": [
        {
            "id": 499502,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499502/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=499502",
            "date": "2026-04-10T20:05:21",
            "name": "ASoC: tegra210: simplify ADX/AMX byte map get/put logic",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/499502/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222209/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222209/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-tegra+bounces-13698-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-tegra@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=LAKGeh42;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13698-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"LAKGeh42\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.175",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fsnzK1Fqwz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 06:12:45 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 3CBAC3060D4E\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 20:06:19 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 120E33859DC;\n\tFri, 10 Apr 2026 20:06:19 +0000 (UTC)",
            "from mail-pl1-f175.google.com (mail-pl1-f175.google.com\n [209.85.214.175])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 804DC37F745\n\tfor <linux-tegra@vger.kernel.org>; Fri, 10 Apr 2026 20:06:17 +0000 (UTC)",
            "by mail-pl1-f175.google.com with SMTP id\n d9443c01a7336-2b2429f98d0so16422535ad.2\n        for <linux-tegra@vger.kernel.org>;\n Fri, 10 Apr 2026 13:06:17 -0700 (PDT)",
            "from lord-daniel-VivoBook-ASUSLaptop-K3502ZA-S3502ZA..\n ([2405:201:31:d01f:a107:5c92:b303:910a])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b2d4dabc08sm39569975ad.5.2026.04.10.13.06.12\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 10 Apr 2026 13:06:16 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775851578; cv=none;\n b=clVIjQkvPJfoKIFjUKjtRfxD4rnqVhtJ2Q12LEqe4iZR8r6KzU/ddEVZRj7NVO5ei7iE46tnVOAxoMpLlTDHsMkrYsF781Y2YvDMSe17hmAbP7v0P/kEE7Z3Dam0CQvXlY8SWgbrjsDBBgSGhDfE4JNb7QlcT16ismLZMaudLVA=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775851578; c=relaxed/simple;\n\tbh=h4cqCKUlB4Wx1NRVb5QN3Ww7sLOHws6IeROjMdYYAuc=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=o6TQbFt8KOI2E2oYGdPZj4iLNjaXSBxJNYHv6qYyMQyF+VSGd6u6cg51q4FxBDwv/QY/QiVSaIknyIWLSra4ai43Os2XK+9xDmzqpMVAvj0D/EyYghbjd65xSOQeA5cbB2ZpjAyEXkzbWRIfwifqGeTpJNucff7gpFBggBS7ksc=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=LAKGeh42; arc=none smtp.client-ip=209.85.214.175",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775851577; x=1776456377;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=AqdWyigSB2CQQBcY06A++oLVwY3qDgG48ezor5HbOpE=;\n        b=LAKGeh42o9pVYTFr1hGk2GTJjPCqmvDvCuTDKbwqiktq828BX7gD5EpG6XCwa1uGsM\n         yIugM/Xh6HDnO6ekWfLK9yBoDBwo6V3cH1vC9LSJZSJybbtupnR0dE5AsMrkWbCJJrHm\n         Xjf7HV5hXN5Ye+SarKDJzgYb7zUo6haMB5M5mGMQyh8BZjW6JhRy9iOuHESNTYt4trUS\n         oZE36hHfLWXZ9E04ZrYflOUgXi/4tq9g7eH9kQnE/vzOCH0Q6Sio2t+/q09FSYxtzHLE\n         uWvzBe+4bXFbnh4qqPBTqIeq9Z3/ZKKHQLYbSu3+5Fzn8P+3tjctBkoVAz+0MXSutwad\n         jMTw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775851577; x=1776456377;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=AqdWyigSB2CQQBcY06A++oLVwY3qDgG48ezor5HbOpE=;\n        b=AxWzYMNkwJX9xhmLaOBwORkoohFubfgt2Xmz8mt6hofWprDVt2fgWehuQL0e/lH68e\n         kAWiCblC4o0PcltO+1HiHg+BfH5yaIiWZC69yMIl+8SBmgydVDTMh+OvuZHl826c8EIf\n         /l2Rlf5jPucNSr0rvH9taOhMFw5SIevt79xCOZzRxKTWVkZ9xn8KQ+/C9gXma+JQfqwb\n         IAFqLplb54sDyUifFf24rxVORpONgolvlnvBTEoHijRn+DPcXphnGlkKNdFcLAebse/g\n         pA0ztQamw/8eYE2H7tO2O2wTAQE9Jf9KR1TfiGFEBSh/YZuK1kju/w42AQpAp8z2Uq4D\n         qWCw==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCVBFsZ51POhuCkDZoxjjMg0jEfQebY5yrwNlMi62BuR5KN40xf0PTz6kWNRBezXYtVhJBy3lxSkE0F5jQ==@vger.kernel.org",
        "X-Gm-Message-State": "AOJu0YyZGD4jTS0JHZ86IZ/eSpYWO0BY65j7HpgRxuR4zGqjtrhGbSlY\n\tNAj5kHB70WGaTXTQvZPsZpFXZI3VaWQ+WkfWsDsoWPT+KOUhdVTILkhy2TWhNdTwgYI=",
        "X-Gm-Gg": "AeBDiesKs6Yyc5KNNigDOURGXw3roHqh5+57QDJ7NQDS/Ijk2aPRuCaZAv25zdAtrBj\n\tWFA5kQxEPPnvcjdy/B5Uu68A8SQKmMGLZuC7dikiVUQNy6lXA6Lom5SuKUDKvSUPpiJPK7c5CWC\n\tiT60y/3wFlzv+oychWRwDJVWw7bP6HtBV0w9VDaHAr2dIwJXM6n8Ta4IzlFBo173/lZ9BA5OU5w\n\td8WQ0oZdUrNlpPpE3u69mOJM0cH9R3rTgk6HtHiUFLM4jP4oG2pvYx/Idp6AWg9vNcIP1DeH70U\n\tZt09LnoGElRN+2Lyk3UjjrJoIwXcC02vcaPcdHMejV2YKyJp5WIHH02Qa3V2UA4Q5+R9w/K1HJm\n\tSvAIxF1rjQMqgb2D53YOTJg56hDS/Zs5tmjtrgIFCzhFY18XnHV4fOWF2fYgFfSpVV2Jc0n1wTF\n\tJcqtG6TGiiw9C3ptgyNPxf1uP00BtBgTqfvkP7rYP7kDwTJqK+lEbfkl1gywWINsxjHh9juk3re\n\tPn3uW+eJzdo0gxM0Or+T9x23SqOA2EEqXUIjqM6",
        "X-Received": "by 2002:a17:902:cec8:b0:2b0:6885:f1d4 with SMTP id\n d9443c01a7336-2b2d5a58899mr44631525ad.39.1775851576688;\n        Fri, 10 Apr 2026 13:06:16 -0700 (PDT)",
        "From": "Piyush Patle <piyushpatle228@gmail.com>",
        "To": "Mark Brown <broonie@kernel.org>",
        "Cc": "Liam Girdwood <lgirdwood@gmail.com>,\n\tJaroslav Kysela <perex@perex.cz>,\n\tTakashi Iwai <tiwai@suse.com>,\n\tThierry Reding <thierry.reding@gmail.com>,\n\tJonathan Hunter <jonathanh@nvidia.com>,\n\tSheetal <sheetal@nvidia.com>,\n\tKuninori Morimoto <kuninori.morimoto.gx@renesas.com>,\n\tlinux-sound@vger.kernel.org,\n\tlinux-tegra@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[PATCH v3 2/2] ASoC: tegra210_amx: simplify byte map get/put logic",
        "Date": "Sat, 11 Apr 2026 01:35:23 +0530",
        "Message-ID": "<20260410200530.171323-3-piyushpatle228@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260410200530.171323-1-piyushpatle228@gmail.com>",
        "References": "<20260410200530.171323-1-piyushpatle228@gmail.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-tegra@vger.kernel.org",
        "List-Id": "<linux-tegra.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-tegra+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-tegra+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "The byte-map controls (\"Byte Map N\") already expose a value range of\n[0, 256] to userspace via SOC_SINGLE_EXT(), where 256 is the\n\"disabled\" sentinel. The driver stored this state as a byte-packed\nu32 map[] array plus a separate byte_mask[] bitmap tracking which\nslots were enabled, because 256 does not fit in a byte. As a result\nget_byte_map() had to consult byte_mask[] to decide whether to\nreport the stored byte or 256, and put_byte_map() had to keep the\ntwo arrays in sync on every write.\n\nStore each slot as a u16 holding the control value directly\n(0..255 enabled, 256 disabled). This is the native representation\nfor what userspace already sees, so get_byte_map() becomes a direct\nreturn and put_byte_map() becomes a compare-and-store. The\nhardware-facing packed RAM word and the OUT_BYTE_EN mask are now\nderived on the fly inside tegra210_amx_write_map_ram() from the\nslot array, which is the only place that needs to know about the\nhardware layout.\n\nThe byte_mask buffer is allocated in probe() using devm_kcalloc()\nwith soc_data->byte_mask_size, so it scales to any SoC variant\nwithout depending on chip-specific constants. It is zeroed and\nrecomputed each time write_map_ram() is called.\n\nA new TEGRA_AMX_SLOTS_PER_WORD constant replaces the literal '4'\nused for byte slots per RAM word, and BITS_PER_BYTE /\nBITS_PER_TYPE() from <linux/bits.h> replace the literal '8' and\n'32' shifts.\n\nSlots are initialised to 256 in probe() so the default reported\nvalue stays \"disabled\", matching previous behaviour. Values written\nfrom userspace that fall outside [0, 255] are clamped to 256\n(\"disabled\") exactly as before -- no userspace-visible change.\n\nAs a side effect this also fixes a latent bug in the previous\nput_byte_map(): because it compared the enable mask rather than the\nstored byte, changing a slot from one enabled value to another\nenabled value (e.g. 42 -> 99) would early-return without persisting\nthe new value, and the next CFG_RAM flush would still program the\nold byte. The new implementation compares the stored value itself,\nso this case is now handled correctly.\n\nAddresses TODO left in tegra210_amx_get_byte_map().\n\nSigned-off-by: Piyush Patle <piyushpatle228@gmail.com>\n---\nChanges since v2:\n - Move byte_mask allocation back to probe() with devm_kcalloc()\n   using soc_data->byte_mask_size; revert write_map_ram() to void\n   and runtime_resume() to returning 0. Suggested by Jon Hunter.\n - Fix bits_per_mask: use BITS_PER_TYPE(*amx->byte_mask) instead of\n   the incorrect BITS_PER_TYPE(*amx->map) * BITS_PER_BYTE. Reported\n   by Mark Brown.\n - Drop <linux/slab.h> include (no longer needed without kfree).\n\nChanges since v1:\n - Use dynamic sizing via soc_data->byte_mask_size instead of\n   chip-specific constants. Suggested by Sheetal.\n - Replace magic numbers with TEGRA_AMX_SLOTS_PER_WORD and use\n   BITS_PER_BYTE / BITS_PER_TYPE(). Suggested by Sheetal.\n - Add <linux/bits.h> include.\n\n sound/soc/tegra/tegra210_amx.c | 82 ++++++++++++++++++----------------\n sound/soc/tegra/tegra210_amx.h |  5 ++-\n 2 files changed, 47 insertions(+), 40 deletions(-)",
    "diff": "diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c\nindex bfda82505298..ecdba16aa756 100644\n--- a/sound/soc/tegra/tegra210_amx.c\n+++ b/sound/soc/tegra/tegra210_amx.c\n@@ -4,6 +4,7 @@\n //\n // tegra210_amx.c - Tegra210 AMX driver\n \n+#include <linux/bits.h>\n #include <linux/clk.h>\n #include <linux/device.h>\n #include <linux/io.h>\n@@ -60,16 +61,35 @@ static const struct reg_default tegra264_amx_reg_defaults[] = {\n \n static void tegra210_amx_write_map_ram(struct tegra210_amx *amx)\n {\n+\tconst unsigned int bits_per_mask = BITS_PER_TYPE(*amx->byte_mask);\n \tint i;\n \n+\tmemset(amx->byte_mask, 0,\n+\t       amx->soc_data->byte_mask_size * sizeof(*amx->byte_mask));\n+\n \tregmap_write(amx->regmap, TEGRA210_AMX_CFG_RAM_CTRL + amx->soc_data->reg_offset,\n \t\t     TEGRA210_AMX_CFG_RAM_CTRL_SEQ_ACCESS_EN |\n \t\t     TEGRA210_AMX_CFG_RAM_CTRL_ADDR_INIT_EN |\n \t\t     TEGRA210_AMX_CFG_RAM_CTRL_RW_WRITE);\n \n-\tfor (i = 0; i < amx->soc_data->ram_depth; i++)\n+\tfor (i = 0; i < amx->soc_data->ram_depth; i++) {\n+\t\tu32 word = 0;\n+\t\tint b;\n+\n+\t\tfor (b = 0; b < TEGRA_AMX_SLOTS_PER_WORD; b++) {\n+\t\t\tunsigned int slot = i * TEGRA_AMX_SLOTS_PER_WORD + b;\n+\t\t\tu16 val = amx->map[slot];\n+\n+\t\t\tif (val >= 256)\n+\t\t\t\tcontinue;\n+\n+\t\t\tword |= (u32)val << (b * BITS_PER_BYTE);\n+\t\t\tamx->byte_mask[slot / bits_per_mask] |=\n+\t\t\t\t1U << (slot % bits_per_mask);\n+\t\t}\n \t\tregmap_write(amx->regmap, TEGRA210_AMX_CFG_RAM_DATA + amx->soc_data->reg_offset,\n-\t\t\t     amx->map[i]);\n+\t\t\t     word);\n+\t}\n \n \tfor (i = 0; i < amx->soc_data->byte_mask_size; i++)\n \t\tregmap_write(amx->regmap,\n@@ -212,26 +232,8 @@ static int tegra210_amx_get_byte_map(struct snd_kcontrol *kcontrol,\n \tstruct soc_mixer_control *mc =\n \t\t(struct soc_mixer_control *)kcontrol->private_value;\n \tstruct tegra210_amx *amx = snd_soc_component_get_drvdata(cmpnt);\n-\tunsigned char *bytes_map = (unsigned char *)amx->map;\n-\tint reg = mc->reg;\n-\tint enabled;\n-\n-\tenabled = amx->byte_mask[reg / 32] & (1 << (reg % 32));\n \n-\t/*\n-\t * TODO: Simplify this logic to just return from bytes_map[]\n-\t *\n-\t * Presently below is required since bytes_map[] is\n-\t * tightly packed and cannot store the control value of 256.\n-\t * Byte mask state is used to know if 256 needs to be returned.\n-\t * Note that for control value of 256, the put() call stores 0\n-\t * in the bytes_map[] and disables the corresponding bit in\n-\t * byte_mask[].\n-\t */\n-\tif (enabled)\n-\t\tucontrol->value.integer.value[0] = bytes_map[reg];\n-\telse\n-\t\tucontrol->value.integer.value[0] = 256;\n+\tucontrol->value.integer.value[0] = amx->map[mc->reg];\n \n \treturn 0;\n }\n@@ -243,22 +245,20 @@ static int tegra210_amx_put_byte_map(struct snd_kcontrol *kcontrol,\n \t\t(struct soc_mixer_control *)kcontrol->private_value;\n \tstruct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);\n \tstruct tegra210_amx *amx = snd_soc_component_get_drvdata(cmpnt);\n-\tunsigned char *bytes_map = (unsigned char *)amx->map;\n-\tint reg = mc->reg;\n-\tint value = ucontrol->value.integer.value[0];\n-\tunsigned int mask_val = amx->byte_mask[reg / 32];\n+\tunsigned int value = ucontrol->value.integer.value[0];\n \n-\tif (value >= 0 && value <= 255)\n-\t\tmask_val |= (1 << (reg % 32));\n-\telse\n-\t\tmask_val &= ~(1 << (reg % 32));\n+\t/*\n+\t * Match the previous behaviour: any value outside [0, 255] is\n+\t * treated as the \"disabled\" sentinel (256). Negative values from\n+\t * userspace fold in through the unsigned cast and are caught here.\n+\t */\n+\tif (value > 255)\n+\t\tvalue = 256;\n \n-\tif (mask_val == amx->byte_mask[reg / 32])\n+\tif (amx->map[mc->reg] == value)\n \t\treturn 0;\n \n-\t/* Update byte map and slot */\n-\tbytes_map[reg] = value % 256;\n-\tamx->byte_mask[reg / 32] = mask_val;\n+\tamx->map[mc->reg] = value;\n \n \treturn 1;\n }\n@@ -727,7 +727,7 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev)\n \tstruct device *dev = &pdev->dev;\n \tstruct tegra210_amx *amx;\n \tvoid __iomem *regs;\n-\tint err;\n+\tint err, i;\n \n \tamx = devm_kzalloc(dev, sizeof(*amx), GFP_KERNEL);\n \tif (!amx)\n@@ -750,17 +750,21 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev)\n \n \tregcache_cache_only(amx->regmap, true);\n \n-\tamx->map = devm_kzalloc(dev, amx->soc_data->ram_depth * sizeof(*amx->map),\n-\t\t\t\tGFP_KERNEL);\n+\tamx->map = devm_kcalloc(dev,\n+\t\t\t\tamx->soc_data->ram_depth * TEGRA_AMX_SLOTS_PER_WORD,\n+\t\t\t\tsizeof(*amx->map), GFP_KERNEL);\n \tif (!amx->map)\n \t\treturn -ENOMEM;\n \n-\tamx->byte_mask = devm_kzalloc(dev,\n-\t\t\t\t      amx->soc_data->byte_mask_size * sizeof(*amx->byte_mask),\n-\t\t\t\t      GFP_KERNEL);\n+\tamx->byte_mask = devm_kcalloc(dev, amx->soc_data->byte_mask_size,\n+\t\t\t\t      sizeof(*amx->byte_mask), GFP_KERNEL);\n \tif (!amx->byte_mask)\n \t\treturn -ENOMEM;\n \n+\t/* Initialise all byte map slots as disabled (value 256). */\n+\tfor (i = 0; i < amx->soc_data->ram_depth * TEGRA_AMX_SLOTS_PER_WORD; i++)\n+\t\tamx->map[i] = 256;\n+\n \ttegra210_amx_dais[TEGRA_AMX_OUT_DAI_ID].capture.channels_max =\n \t\t\tamx->soc_data->max_ch;\n \ndiff --git a/sound/soc/tegra/tegra210_amx.h b/sound/soc/tegra/tegra210_amx.h\nindex 50a237b197ba..420b62f0cf35 100644\n--- a/sound/soc/tegra/tegra210_amx.h\n+++ b/sound/soc/tegra/tegra210_amx.h\n@@ -8,6 +8,8 @@\n #ifndef __TEGRA210_AMX_H__\n #define __TEGRA210_AMX_H__\n \n+#include <linux/types.h>\n+\n /* Register offsets from TEGRA210_AMX*_BASE */\n #define TEGRA210_AMX_RX_STATUS\t\t\t0x0c\n #define TEGRA210_AMX_RX_INT_STATUS\t\t0x10\n@@ -73,6 +75,7 @@\n #define TEGRA210_AMX_SOFT_RESET_SOFT_RESET_MASK\t\tTEGRA210_AMX_SOFT_RESET_SOFT_EN\n \n #define TEGRA210_AMX_AUDIOCIF_CH_STRIDE\t\t4\n+#define TEGRA_AMX_SLOTS_PER_WORD\t\t4\n #define TEGRA210_AMX_RAM_DEPTH\t\t\t16\n #define TEGRA210_AMX_MAP_STREAM_NUM_SHIFT\t6\n #define TEGRA210_AMX_MAP_WORD_NUM_SHIFT\t\t2\n@@ -105,8 +108,8 @@ struct tegra210_amx_soc_data {\n \n struct tegra210_amx {\n \tconst struct tegra210_amx_soc_data *soc_data;\n-\tunsigned int *map;\n \tunsigned int *byte_mask;\n+\tu16 *map;\n \tstruct regmap *regmap;\n };\n \n",
    "prefixes": [
        "v3",
        "2/2"
    ]
}