diff options
author | Takashi Iwai <tiwai@suse.de> | 2025-01-07 16:56:34 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2025-01-07 17:35:11 +0100 |
commit | b3344ddb78e16e629a397ab67fd20c9ec7662f75 (patch) | |
tree | f314c23a1d98819d5a296c9e01d8b79dd4caa2f9 /sound/pci | |
parent | 7eb4317c5ae78aff88ddf2a0c8ee8f8d7c84c170 (diff) |
ALSA: emu10k1: Simplify with str_on_off()
Use the standard helper str_on_off() to simplify the code.
Only code refactoring, no behavior change.
Link: https://patch.msgid.link/20250107155641.4435-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/emu10k1/emuproc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index 737c28d31b41..47448750f334 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c @@ -46,9 +46,9 @@ static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, if (rate_reg > 0) { rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); - snd_iprintf(buffer, "S/PDIF Valid : %s\n", rate & SRCS_SPDIFVALID ? "on" : "off"); - snd_iprintf(buffer, "S/PDIF Locked : %s\n", rate & SRCS_SPDIFLOCKED ? "on" : "off"); - snd_iprintf(buffer, "Rate Locked : %s\n", rate & SRCS_RATELOCKED ? "on" : "off"); + snd_iprintf(buffer, "S/PDIF Valid : %s\n", str_on_off(rate & SRCS_SPDIFVALID)); + snd_iprintf(buffer, "S/PDIF Locked : %s\n", str_on_off(rate & SRCS_SPDIFLOCKED)); + snd_iprintf(buffer, "Rate Locked : %s\n", str_on_off(rate & SRCS_RATELOCKED)); /* From ((Rate * 48000 ) / 262144); */ snd_iprintf(buffer, "Estimated Sample Rate : %d\n", ((rate & 0xFFFFF ) * 375) >> 11); } @@ -208,7 +208,7 @@ static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry, #if 0 val = snd_emu10k1_ptr_read(emu, ZVSRCS, 0); snd_iprintf(buffer, "\nZoomed Video\n"); - snd_iprintf(buffer, "Rate Locked : %s\n", val & SRCS_RATELOCKED ? "on" : "off"); + snd_iprintf(buffer, "Rate Locked : %s\n", str_on_off(val & SRCS_RATELOCKED)); snd_iprintf(buffer, "Estimated Sample Rate : 0x%x\n", val & SRCS_ESTSAMPLERATE); #endif } |