{"id":2220617,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2220617/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/cover/20260407170308.100238-1-piyushpatle228@gmail.com/","project":{"id":21,"url":"http://patchwork.ozlabs.org/api/1.1/projects/21/?format=json","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":"<20260407170308.100238-1-piyushpatle228@gmail.com>","date":"2026-04-07T17:03:06","name":"[0/2] ASoC: tegra210: simplify byte map handling in ADX and AMX","submitter":{"id":92665,"url":"http://patchwork.ozlabs.org/api/1.1/people/92665/?format=json","name":"Piyush Patle","email":"piyushpatle228@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/linux-tegra/cover/20260407170308.100238-1-piyushpatle228@gmail.com/mbox/","series":[{"id":499009,"url":"http://patchwork.ozlabs.org/api/1.1/series/499009/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/list/?series=499009","date":"2026-04-07T17:03:06","name":"ASoC: tegra210: simplify byte map handling in ADX and AMX","version":1,"mbox":"http://patchwork.ozlabs.org/series/499009/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2220617/comments/","headers":{"Return-Path":"\n <linux-tegra+bounces-13598-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=bz9AiL+t;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13598-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=\"bz9AiL+t\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.174","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\n [IPv6:2600:3c0a:e001:db::12fc:5321])\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 4fqswZ5CSyz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 03:03:42 +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 BCF4930063AC\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  7 Apr 2026 17:03:25 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9686F3D1CAD;\n\tTue,  7 Apr 2026 17:03:25 +0000 (UTC)","from mail-pl1-f174.google.com (mail-pl1-f174.google.com\n [209.85.214.174])\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 52B113D0915\n\tfor <linux-tegra@vger.kernel.org>; Tue,  7 Apr 2026 17:03:24 +0000 (UTC)","by mail-pl1-f174.google.com with SMTP id\n d9443c01a7336-2ad9a9be502so34092855ad.0\n        for <linux-tegra@vger.kernel.org>;\n Tue, 07 Apr 2026 10:03:24 -0700 (PDT)","from\n lorddaniel-VivoBook-ASUSLaptop-K3502ZA-S3502ZA.www.tendawifi.com\n ([14.139.108.62])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b27478cb4fsm196617905ad.29.2026.04.07.10.03.19\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 07 Apr 2026 10:03:22 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775581405; cv=none;\n b=NixFDYTrLxiG8whPWEkIn2SwzAk6Xh0mPUCVWLfAYBjbqytT47k9B7nK0rbgHM0VmEq61cO5SId2xtaZ+k/aWPMrjfFx6rVcKzOxaOEMkf2GVVCNiQjdE7TIBrB+JE9ArNIaBzkbf6nc6GaXnvlGva7I243TUjAA/DSr6arLDBQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775581405; c=relaxed/simple;\n\tbh=yS7fLPfpixS5ANKUpz+8IbWfPa7J2Jlmh+GVNICRquY=;\n\th=From:To:Cc:Subject:Date:Message-Id:MIME-Version;\n b=pR8irovR/uaRRvPI85goBawEU9ugwZAgfQB7h+fWnYNNtQXnhKBhEoGE33eMVmVRlcb1LiQq6QgyD7FG7jKIogduAyTJryMDodFCkVgjey4cI+J4SYU4I1I7QY/08OMTRHJJCCSoCEESHYioa2m3y5MN2ymfGXc+YdTJoRij3JY=","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=bz9AiL+t; arc=none smtp.client-ip=209.85.214.174","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775581404; x=1776186204;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=USinWtrK9cNysHqIyf7r5O6B/9/TrlyTmryTw2WVrbs=;\n        b=bz9AiL+twoSLeq+CzPPAgwn4mWno8WWwjt/NBjC0PvxmAPk3tfCLAF5FpfgNQzdGCn\n         7JBHv/wyjnuE3m6L7Bc1g0vJmZsKEsUTBA+Uj5KknjQBrH8d0o54ncQQohhx6SxNqpbv\n         EpsYeenlfUqc58p85pTdptppS8hk8TQOxqYFkc8+4ON2uQhDM75w4R0eSI4Z+9MFfvyt\n         FdIAXzb7vbkzq07NSr2syksKv4NCNFTz7cbWWSAl9k7C4bOiMmD9Wfg/+M7fwCl27CG1\n         iEyQeNcLYqIEMqjZ9/0vJ4XctDEA2t16QsrZlO4VyHiGf36lAuyT4aLscnSOxsbVp0CR\n         2wIg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775581404; x=1776186204;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=USinWtrK9cNysHqIyf7r5O6B/9/TrlyTmryTw2WVrbs=;\n        b=mGwle1bc9MIwymcFrxLNgJSks0OWB06knjZsh0I5ZDFO4cxC/+Ct/0Itebi+8GOJTI\n         o46AAmAZPGTE/QaY/OflG04U/SBePqM4+Tm31aZftVIc3nmB48rZW0G32fZLphO/to9z\n         CP1f12itzYaq8J9ZbMSwug7Lpj9RFQtYLaNJXyE7OcC4nYsDixtv9PrNsYflIn++U61c\n         Lwx4U+D3HGkWa06a2FkSgNrwVGRKzLdDpKaTSDJurUVojBAc9tRhpf7dw7NMO49Th3df\n         XW/JugccCE7crofh1iXqAFvKGfgXwjvDmVzBeZbR6eDsPEqZ2NLe2CXaBYNVT6NyeKlh\n         gPsA==","X-Forwarded-Encrypted":"i=1;\n AJvYcCV51Uyp9ziiLj6HaBFEk74aXjwvmIQ0Z1KKbKk2dIDUxSh2AKvwC0wTpoWzg6s1Oew1YpsL4d8dJZ5EVQ==@vger.kernel.org","X-Gm-Message-State":"AOJu0YwDsWjehoiooiItKTTG15DgQ9INXJD9q8z/Xxbmbsb1Nkq+vax/\n\t9Tx+xaHtRqkH+5xJULispEE/RzCq/XY4PTaYckw7tdndYZVUoJ9oCNAq","X-Gm-Gg":"AeBDieuorFY/Yc5TxW7baGgvPI7WEDI18iER782v0TrmLUVJlev/tuCs3lalKShnfUh\n\t933B91r4m/0fMN1bJWJfsW303AdZyUmFU3AO/e9mxS4upyyBOnikhWT1Q2KxEnVPM9iSSxObLgd\n\t7/gfVp/Gr2b7g6dSPRnA7FJgEkXl90zs8jYR0rXmq85y4C0tnWw14GqGy5S6QR8lc/Ovb6WgzDc\n\tK9bCS4ukrV0hmNU2V5rMSp0mXakGJkJ/QyXzD9TnVT/gFhqKd5HPNEXByDOBh2AfiHHRkkJAIqW\n\tlgbFxlLOOXz1eiC+0uNAcO30vL11h85q2PKT+7flu5NmswelbS5n0ymgfmGqtYTUGkykO2dZECf\n\t0DvnRopG9zVin0G7QAtMSUiED4nkMDUEexpP+kKKINX2XYaMDWsPuV3fb1HeBLFtnl6a2YishiK\n\tlmlNFvgpVaHHpTVTl4LLgBZBFDSYUmFmUqpnSH0OlpOQMdjaCiSV15X7IHnoimpcBJddRNMY2hE\n\tXWzxLTEc+l7S386n/ht11DsKmkSgeJv3AeqhNpgimVRTiptO8HYFDyD6Q==","X-Received":"by 2002:a17:903:3c47:b0:2b0:67a7:5c4b with SMTP id\n d9443c01a7336-2b281802d24mr196869375ad.28.1775581403501;\n        Tue, 07 Apr 2026 10:03:23 -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 0/2] ASoC: tegra210: simplify byte map handling in ADX and AMX","Date":"Tue,  7 Apr 2026 22:33:06 +0530","Message-Id":"<20260407170308.100238-1-piyushpatle228@gmail.com>","X-Mailer":"git-send-email 2.34.1","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 Tegra210 ADX and AMX drivers both keep their \"Byte Map N\" ALSA\ncontrol state as a byte-packed u32 map[] array along with a separate\nbyte_mask[] bitmap. This is because the control range exposed to\nuserspace is [0, 256], where 256 is the \"disabled\" sentinel and\ndoes not fit in a byte, so the two arrays have to be cross-checked\non every get()/put().\n\nThis series stores each slot as a u16 holding the user-visible\nvalue directly, turning get_byte_map() into a direct return and\nput_byte_map() into a compare-and-store. The hardware-facing packed\nRAM word and the IN_BYTE_EN / OUT_BYTE_EN enable masks are computed\non the fly inside each write_map_ram() callback, which is the only\nplace that needs to know the hardware layout. The byte_mask[] field\nis dropped from both driver state structs.\n\nThere is no userspace-visible ABI change. Control declarations,\nranges, initial values and handling of out-of-range writes is\npreserved by treating values outside [0, 255] as disabled (256),\nmatching previous behavior. As a side effect each patch also fixes\na latent bug in put_byte_map() where an enabled-to-enabled value\nchange was not persisted.\n\nThe packed RAM word construction is also updated to ensure the shift\noperates on a u32 value, avoiding potential undefined behavior due\nto signed integer promotion.\n\nAddresses TODO comments left in tegra210_{adx,amx}_get_byte_map().\n\nPatch 1/2: ASoC: tegra210_adx: simplify byte map get/put logic\nPatch 2/2: ASoC: tegra210_amx: simplify byte map get/put logic"}