From patchwork Mon Jan 22 11:45:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rui Salvaterra X-Patchwork-Id: 13525310 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB07D3AC19; Mon, 22 Jan 2024 11:45:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705923949; cv=none; b=jOpXd+nBiRkq8ffKGGyLNuM8YhzzT7jaQ5LTgi3zopz2CywOTLnNo+nxjyL+eIPOX+UWNeInvCwuHAbI/FBFIYtbz0q/UYHqeDHREzOYUzP497r+pRvSPQ/CuJnALP/nIWqZBPYFIkqmLVP1EHZE4AGElK5SzueUdZYNeOG7gBQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705923949; c=relaxed/simple; bh=lDqTFONZguWVoI4iQdzCWEOoVdj8OaBzNQdR/j8lL1s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dido8nphgTbu4XhQrqcqtUFzuu9AkG3gZDXNfdHZVfQk07s9y9wcXy/KMksgcyX7g21BM2ypA47tQoOFnXpfjgEY23CjxpUcX/GEa/nR061lW+Sn8ytjByl2eVjPaPdD0BWlKEN4bQFCm7A1g3l7HMzgRVwhlrwNNnpbip2fJ0w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WO7rDqaQ; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WO7rDqaQ" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40e87d07c07so39258355e9.1; Mon, 22 Jan 2024 03:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705923946; x=1706528746; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=og6eC9+qsmXGNdAAW90m6JmbZGEJBXXA+IqkIhag9Wc=; b=WO7rDqaQ6Ma9IyFjletyegq3c83eP+u60sHNQcEkyQ/96C+EnlSV18yS5ya9zTr9Gr Q/+36H7ju4Rt8Yn0kRWWoi7McX01Bk3xRO5fhuKsu2fJhccYWaeUWIyOpDZ0mAvR11Gu OscMvIfk1oe//DBi89Jabn724LaAxZA1jl7kHfWA5pzp4PDfKNXP96Y0CArZt3b1wCqH 8DVTkGULqsMv+cChh59iD+XPjW5/gpKm6cZ7ykhAaGsipJLe9kQcHPnT557n7t/K1cnF DJ6FC+QB+xCNXTwVOTBzQR5nyy7zLg+xlcwM+WYPlTy9PDuWRG22bWKaf3lYCgNgY/un 1SQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705923946; x=1706528746; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=og6eC9+qsmXGNdAAW90m6JmbZGEJBXXA+IqkIhag9Wc=; b=CZyRE6DNEWjzxVQ/Hs1iW1VSG4ALBRz1/5SsBkuDDdUxz4V7HQtasNlcOQYqjXnvbE PwfIBYXRzeXqbZLWm6c5eTTP6g+CdZZjutAxaOIfQVx8QSqrnrxQfDTYAizzSHxV2DGt kKWI5wYPOFxPi1NiQp3cLae2uxqcmS1lMtkWhFYRYPgMwudFoPn3tUm4SX7JXViJUhbn uAVsp5GHzFsxz3dsP62keO/EiocatWTct9mruXb+lseU8NdSX/i1nF2V4OMlK5uxIJc/ O0BqWtPOjiCr0Sxsl8xMbuvBcfwnxLl9BAo1SIX3ZqYlq3sAK3cfZesyeXluVu2NqzwA 4meg== X-Gm-Message-State: AOJu0YwMIZOA+wByjaFREI+7ybfNElgflWz/kpuguMkYHSvD01kJK9S5 6c1gunS3HRoiSppd3OkSXWnaU03Ikwia5RijYdtgQuPTf3pDG4kPaduddyE= X-Google-Smtp-Source: AGHT+IHE2c8y+Il/LywBJfAfQ06RJUwiZ/H1df0Qb8r5knfiKNeICJTHkeRPWasd/ylBvnOUpeuB4A== X-Received: by 2002:a05:600c:6b04:b0:40e:5326:718f with SMTP id jn4-20020a05600c6b0400b0040e5326718fmr2181635wmb.184.1705923945810; Mon, 22 Jan 2024 03:45:45 -0800 (PST) Received: from phoenix.rocket.std.lan (a95-93-126-153.cpe.netcabo.pt. [95.93.126.153]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0040d7b340e07sm38990358wmq.45.2024.01.22.03.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 03:45:45 -0800 (PST) From: Rui Salvaterra To: amadeuszx.slawinski@linux.intel.com, tiwai@suse.com Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Rui Salvaterra Subject: [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Date: Mon, 22 Jan 2024 11:45:12 +0000 Message-ID: <20240122114512.55808-2-rsalvaterra@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 We have self-explanatory constants for Intel HDA devices, let's use them instead of magic numbers and code comments. Signed-off-by: Rui Salvaterra Reviewed-by: Amadeusz Sławiński --- sound/pci/hda/hda_intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 2276adc84478..66f013ee160d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1729,8 +1729,8 @@ static int default_bdl_pos_adj(struct azx *chip) /* some exceptions: Atoms seem problematic with value 1 */ if (chip->pci->vendor == PCI_VENDOR_ID_INTEL) { switch (chip->pci->device) { - case 0x0f04: /* Baytrail */ - case 0x2284: /* Braswell */ + case PCI_DEVICE_ID_INTEL_HDA_BYT: + case PCI_DEVICE_ID_INTEL_HDA_BSW: return 32; } }