Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2955462lqp; Mon, 25 Mar 2024 14:27:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWbfiiT5KTOnZsFCmybCuZ1k46cncsNySHQNv30YNkTFX2YIh7ZmUNWBs9LDGfIuP/RdYznJiCF6FojvzSFH/I3/lQzLRpKMefAaTTKQw== X-Google-Smtp-Source: AGHT+IFFSko8hR45SLV3kUAz5mraCIucTCiuIsWGNIFhVkCFpSePHKpo6gJefB2i4bf0kXvMVfYe X-Received: by 2002:ae9:ee09:0:b0:78a:ef:fcb8 with SMTP id i9-20020ae9ee09000000b0078a00effcb8mr8695480qkg.67.1711402023177; Mon, 25 Mar 2024 14:27:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711402023; cv=pass; d=google.com; s=arc-20160816; b=jrLybs6BtDHBVLCJ+LGqV0NIQpu9bmsl39iOdauBbW4TpQmAGKldcb2p32/kwwfoqp pNwxG/SKIBKTmnbF4wm0t8UrJ9uA2ndLPGXoejG6xScPAusnERPO4rf3lz5psjWwxZox iPAJ0gNvNELGGvknli8SeAzGKBWAQScxxJQCCxzX5EbnnTHKMjH4qldywtxJ2SmL3cvh 39dbRmvLYycWay4zA129QikHDYVf7dL2Cw/WNhKt9/XVJ77JWNbhKtLHpNxg+v5b5zH8 nOMl0Cd8QNpkucjDINhfbRA7/JK36EsEHfOJyEISk22gAQtbVE9WFuHU2AjH5GYTiPQd qmvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=kVpfsRQg9byGfzXAopCxFbjAYlz6K+j8uJnJX2b0oyU=; fh=Kvgp4oGHUVFqEnpVKMdjH17DHHYx2Zy3W6/0u2/j+pM=; b=w4Mz6/ENetOjMdLWtDiWa9Cp3RTITmCMFZcFZ0SEX+3AE70xTAZSDy73gJKktpTNJE 0OV7GPiSb8DcahED13v3n+cnHSyocScxU+iaS8QR/rrALtr3VRlqAUF1apaT+lCfGIAV syqtIqzx8SbRN19Gsn7mNo/CiQMPRnoANsUciaoJKjcU1Pj8BH9KHNsHO6dWsVPkBbRM hGXcHPaIelhRY5I6tNQDp0xE3Lc9wd7NBB/ZC02aidzu4wqktA54Xlh98/vAeDXst7XG L72KZ02muk+EUf0nEQ8OMxWzLbWZYXFxYwVjW5RarJ2t5Ps/2GYrnGy9Ftce6/6LCiyQ o2xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-118036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id oq22-20020a05620a611600b0078a4639dc11si5563855qkn.324.2024.03.25.14.27.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 14:27:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-118036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 95EEC1C3E5E0 for ; Mon, 25 Mar 2024 21:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0429671742; Mon, 25 Mar 2024 21:26:09 +0000 (UTC) Received: from irl.hu (irl.hu [95.85.9.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE7736FE2A; Mon, 25 Mar 2024 21:26:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.85.9.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711401968; cv=none; b=Vrjb33XOzDrSQNK8Di5QArcdG1gN6B5Foo6VaSbU4hCpv8vQZimD8eVj42hrnX5iYYOrFP44/Qc2Z3uIea7lpTWlbMKpb7MxemPFuyYVyK/cyqGxp0wPA4EdW3IyX8ErpeXrJ3UwiD6oGzQHSuSS5qgxlos6HSAKsV8S0rlZjvM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711401968; c=relaxed/simple; bh=7tKjUPBeypTJx3dhjiPVGtY+r3oYW9ckUbJZzdlsjYY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Type; b=k/6Jflculyxgx5KZlQrsLfRI5kZ1yt22ZmP80hhzpAXfeSPsNPkM6h8IQ7pyoYGUtPJQLRaYSEmge3Pur+5PWNeq2Ihh7XaCXMRImsyRoj5NuR/io3CIuM4Na8sWo7liJl8k3KYqgpbmLPQAkDItt/Lx65zHz9jDom0pyxHx7po= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu; spf=pass smtp.mailfrom=irl.hu; arc=none smtp.client-ip=95.85.9.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=irl.hu Received: from fedori.lan (51b68717.dsl.pool.telekom.hu [::ffff:81.182.135.23]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 00000000000770B0.000000006601EBEE.0023A89D; Mon, 25 Mar 2024 22:26:03 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Gergo Koteles Subject: [PATCH 3/3] ALSA: hda/tas2781: add debug statements to kcontrols Date: Mon, 25 Mar 2024 22:25:35 +0100 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 Sometimes it is useful to examine the timing of kcontrol events. Add debug statements to each kcontrol. Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 9a43f563bb9e..b60ce4c2c090 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -189,6 +189,9 @@ static int tasdevice_get_profile_id(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = tas_priv->rcabin.profile_cfg_id; + dev_dbg(tas_priv->dev, "%s: %d\n", __func__, + tas_priv->rcabin.profile_cfg_id); + mutex_unlock(&tas_priv->codec_lock); return 0; @@ -206,6 +209,9 @@ static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol, mutex_lock(&tas_priv->codec_lock); + dev_dbg(tas_priv->dev, "%s: %d -> %d\n", __func__, + tas_priv->rcabin.profile_cfg_id, val); + if (tas_priv->rcabin.profile_cfg_id != val) { tas_priv->rcabin.profile_cfg_id = val; ret = 1; @@ -253,6 +259,8 @@ static int tasdevice_program_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = tas_priv->cur_prog; + dev_dbg(tas_priv->dev, "%s: %d\n", __func__, tas_priv->cur_prog); + mutex_unlock(&tas_priv->codec_lock); return 0; @@ -271,6 +279,9 @@ static int tasdevice_program_put(struct snd_kcontrol *kcontrol, mutex_lock(&tas_priv->codec_lock); + dev_dbg(tas_priv->dev, "%s: %d -> %d\n", __func__, + tas_priv->cur_prog, val); + if (tas_priv->cur_prog != val) { tas_priv->cur_prog = val; ret = 1; @@ -290,6 +301,8 @@ static int tasdevice_config_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = tas_priv->cur_conf; + dev_dbg(tas_priv->dev, "%s: %d\n", __func__, tas_priv->cur_conf); + mutex_unlock(&tas_priv->codec_lock); return 0; @@ -308,6 +321,9 @@ static int tasdevice_config_put(struct snd_kcontrol *kcontrol, mutex_lock(&tas_priv->codec_lock); + dev_dbg(tas_priv->dev, "%s: %d -> %d\n", __func__, + tas_priv->cur_conf, val); + if (tas_priv->cur_conf != val) { tas_priv->cur_conf = val; ret = 1; @@ -330,6 +346,9 @@ static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol, ret = tasdevice_amp_getvol(tas_priv, ucontrol, mc); + dev_dbg(tas_priv->dev, "%s: %ld\n", __func__, + ucontrol->value.integer.value[0]); + mutex_unlock(&tas_priv->codec_lock); return ret; @@ -345,6 +364,9 @@ static int tas2781_amp_putvol(struct snd_kcontrol *kcontrol, mutex_lock(&tas_priv->codec_lock); + dev_dbg(tas_priv->dev, "%s: %ld\n", __func__, + ucontrol->value.integer.value[0]); + /* The check of the given value is in tasdevice_amp_putvol. */ ret = tasdevice_amp_putvol(tas_priv, ucontrol, mc); -- 2.44.0