From 3f17db2ef5f76d45f2336e63cd1b1211bc5a4afb Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 5 Apr 2007 17:23:42 +0200 Subject: [PATCH] amixer - show iec958 status bits in contents command Show first 4 bytes of iec958 status bits for elements with SND_CTL_ELEM_TYPE_IEC958 in contents command. --- amixer/amixer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/amixer/amixer.c b/amixer/amixer.c index 2a8db60..a839e1e 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -534,6 +534,7 @@ static int show_control(const char *space, snd_hctl_elem_t *elem, snd_ctl_elem_id_t *id; snd_ctl_elem_info_t *info; snd_ctl_elem_value_t *control; + snd_aes_iec958_t iec958; snd_ctl_elem_id_alloca(&id); snd_ctl_elem_info_alloca(&info); snd_ctl_elem_value_alloca(&control); @@ -605,6 +606,12 @@ static int show_control(const char *space, snd_hctl_elem_t *elem, case SND_CTL_ELEM_TYPE_BYTES: printf("0x%02x", snd_ctl_elem_value_get_byte(control, idx)); break; + case SND_CTL_ELEM_TYPE_IEC958: + snd_ctl_elem_value_get_iec958(control, &iec958); + printf("[AES0=0x%02x AES1=0x%02x AES2=0x%02x AES3=0x%02x]", + iec958.status[0], iec958.status[1], + iec958.status[2], iec958.status[3]); + break; default: printf("?"); break; -- 2.47.1