mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 03:05:43 +01:00
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.
This commit is contained in:
parent
bb3a24513f
commit
3f17db2ef5
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue