aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKai Vehmanen <kai.vehmanen@linux.intel.com>2020-12-11 14:45:47 +0200
committerTakashi Iwai <tiwai@suse.de>2020-12-11 14:02:47 +0100
commit13b1f8aa6569060480dc747e45741581dbc0cfc2 (patch)
treec639ad9f3aa0d699142dcedf25a94fade335325b /sound
parentALSA: hda/ca0132 - Remove now unnecessary DSP setup functions. (diff)
downloadlinux-dev-13b1f8aa6569060480dc747e45741581dbc0cfc2.tar.xz
linux-dev-13b1f8aa6569060480dc747e45741581dbc0cfc2.zip
ALSA: hda/hdmi: always print pin NIDs as hexadecimal
The debug prints from patch_hdmi.c are not aligned with HDA common code in hda_codec.c nor with other HDA codec drivers. To align with rest of the codebase, use hexadecimal formatting whenever printing value of a HDA NID. Also refer to NIDs with capital letters in traces as is done other modules. This presentation is also aligned with the formatting used in HDA codec procfs entry. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20201211124547.3243871-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_hdmi.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 2ddc27db8c01..22f5a29d25f6 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -253,7 +253,7 @@ static int pin_id_to_pin_index(struct hda_codec *codec,
return pin_idx;
}
- codec_warn(codec, "HDMI: pin nid %d not registered\n", pin_nid);
+ codec_warn(codec, "HDMI: pin NID 0x%x not registered\n", pin_nid);
return -EINVAL;
}
@@ -313,7 +313,7 @@ static int cvt_nid_to_cvt_index(struct hda_codec *codec, hda_nid_t cvt_nid)
if (get_cvt(spec, cvt_idx)->cvt_nid == cvt_nid)
return cvt_idx;
- codec_warn(codec, "HDMI: cvt nid %d not registered\n", cvt_nid);
+ codec_warn(codec, "HDMI: cvt NID 0x%x not registered\n", cvt_nid);
return -EINVAL;
}
@@ -687,8 +687,7 @@ static void hdmi_pin_setup_infoframe(struct hda_codec *codec,
dp_ai->CC02_CT47 = active_channels - 1;
dp_ai->CA = ca;
} else {
- codec_dbg(codec, "HDMI: unknown connection type at pin %d\n",
- pin_nid);
+ codec_dbg(codec, "HDMI: unknown connection type at pin NID 0x%x\n", pin_nid);
return;
}
@@ -701,10 +700,8 @@ static void hdmi_pin_setup_infoframe(struct hda_codec *codec,
*/
if (!hdmi_infoframe_uptodate(codec, pin_nid, ai.bytes,
sizeof(ai))) {
- codec_dbg(codec,
- "hdmi_pin_setup_infoframe: pin=%d channels=%d ca=0x%02x\n",
- pin_nid,
- active_channels, ca);
+ codec_dbg(codec, "%s: pin NID=0x%x channels=%d ca=0x%02x\n",
+ __func__, pin_nid, active_channels, ca);
hdmi_stop_infoframe_trans(codec, pin_nid);
hdmi_fill_audio_infoframe(codec, pin_nid,
ai.bytes, sizeof(ai));
@@ -796,7 +793,7 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res,
jack->jack_dirty = 1;
codec_dbg(codec,
- "HDMI hot plug event: Codec=%d Pin=%d Device=%d Inactive=%d Presence_Detect=%d ELD_Valid=%d\n",
+ "HDMI hot plug event: Codec=%d NID=0x%x Device=%d Inactive=%d Presence_Detect=%d ELD_Valid=%d\n",
codec->addr, jack->nid, jack->dev_id, !!(res & AC_UNSOL_RES_IA),
!!(res & AC_UNSOL_RES_PD), !!(res & AC_UNSOL_RES_ELDV));
@@ -874,7 +871,7 @@ static void haswell_verify_D0(struct hda_codec *codec,
msleep(40);
pwr = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_POWER_STATE, 0);
pwr = (pwr & AC_PWRST_ACTUAL) >> AC_PWRST_ACTUAL_SHIFT;
- codec_dbg(codec, "Haswell HDMI audio: Power for pin 0x%x is now D%d\n", nid, pwr);
+ codec_dbg(codec, "Haswell HDMI audio: Power for NID 0x%x is now D%d\n", nid, pwr);
}
}
@@ -1121,8 +1118,8 @@ static void intel_not_share_assigned_cvt(struct hda_codec *codec,
per_cvt = get_cvt(spec, cvt_idx);
if (!per_cvt->assigned) {
codec_dbg(codec,
- "choose cvt %d for pin nid %d\n",
- cvt_idx, nid);
+ "choose cvt %d for pin NID 0x%x\n",
+ cvt_idx, nid);
snd_hda_codec_write_cache(codec, nid, 0,
AC_VERB_SET_CONNECT_SEL,
cvt_idx);
@@ -1320,7 +1317,7 @@ static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx)
if (!(get_wcaps(codec, pin_nid) & AC_WCAP_CONN_LIST)) {
codec_warn(codec,
- "HDMI: pin %d wcaps %#x does not support connection list\n",
+ "HDMI: pin NID 0x%x wcaps %#x does not support connection list\n",
pin_nid, get_wcaps(codec, pin_nid));
return -EINVAL;
}
@@ -1635,7 +1632,7 @@ static void hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
eld->eld_valid = false;
codec_dbg(codec,
- "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n",
+ "HDMI status: Codec=%d NID=0x%x Presence_Detect=%d ELD_Valid=%d\n",
codec->addr, pin_nid, eld->monitor_present, eld->eld_valid);
if (eld->eld_valid) {
@@ -2795,7 +2792,7 @@ static int intel_pin2port(void *audio_ptr, int pin_nid)
return i;
}
- codec_info(codec, "Can't find the HDMI/DP port for pin %d\n", pin_nid);
+ codec_info(codec, "Can't find the HDMI/DP port for pin NID 0x%x\n", pin_nid);
return -1;
}