Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: hdsp: Use str_on_off() and str_yes_no() helper functions

Remove hard-coded strings by using the str_on_off() and str_yes_no()
helper functions.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20241216123412.64691-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Thorsten Blum and committed by
Takashi Iwai
42b09e10 42d28736

+5 -5
+5 -5
sound/pci/rme9652/hdsp.c
··· 3444 3444 snd_iprintf(buffer, "MIDI1 Input status: 0x%x\n", hdsp_read(hdsp, HDSP_midiStatusIn0)); 3445 3445 snd_iprintf(buffer, "MIDI2 Output status: 0x%x\n", hdsp_read(hdsp, HDSP_midiStatusOut1)); 3446 3446 snd_iprintf(buffer, "MIDI2 Input status: 0x%x\n", hdsp_read(hdsp, HDSP_midiStatusIn1)); 3447 - snd_iprintf(buffer, "Use Midi Tasklet: %s\n", hdsp->use_midi_work ? "on" : "off"); 3447 + snd_iprintf(buffer, "Use Midi Tasklet: %s\n", str_on_off(hdsp->use_midi_work)); 3448 3448 3449 3449 snd_iprintf(buffer, "\n"); 3450 3450 ··· 3452 3452 3453 3453 snd_iprintf(buffer, "Buffer Size (Latency): %d samples (2 periods of %lu bytes)\n", x, (unsigned long) hdsp->period_bytes); 3454 3454 snd_iprintf(buffer, "Hardware pointer (frames): %ld\n", hdsp_hw_pointer(hdsp)); 3455 - snd_iprintf(buffer, "Precise pointer: %s\n", hdsp->precise_ptr ? "on" : "off"); 3456 - snd_iprintf(buffer, "Line out: %s\n", (hdsp->control_register & HDSP_LineOut) ? "on" : "off"); 3455 + snd_iprintf(buffer, "Precise pointer: %s\n", str_on_off(hdsp->precise_ptr)); 3456 + snd_iprintf(buffer, "Line out: %s\n", str_on_off(hdsp->control_register & HDSP_LineOut)); 3457 3457 3458 3458 snd_iprintf(buffer, "Firmware version: %d\n", (status2&HDSP_version0)|(status2&HDSP_version1)<<1|(status2&HDSP_version2)<<2); 3459 3459 ··· 3750 3750 snd_iprintf(buffer, "Phones Gain : %s\n", tmp); 3751 3751 3752 3752 snd_iprintf(buffer, "XLR Breakout Cable : %s\n", 3753 - hdsp_toggle_setting(hdsp, HDSP_XLRBreakoutCable) ? 3754 - "yes" : "no"); 3753 + str_yes_no(hdsp_toggle_setting(hdsp, 3754 + HDSP_XLRBreakoutCable))); 3755 3755 3756 3756 if (hdsp->control_register & HDSP_AnalogExtensionBoard) 3757 3757 snd_iprintf(buffer, "AEB : on (ADAT1 internal)\n");