]> git.alsa-project.org Git - alsa-utils.git/commitdiff
amixer - show iec958 status bits in contents command
authorTakashi Iwai <tiwai@suse.de>
Thu, 5 Apr 2007 15:23:42 +0000 (17:23 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 5 Apr 2007 15:23:42 +0000 (17:23 +0200)
Show first 4 bytes of iec958 status bits for elements with
SND_CTL_ELEM_TYPE_IEC958 in contents command.

amixer/amixer.c

index 2a8db605a0e7648a8772be9619e672739266e93d..a839e1e0bca8625b0dbc9ad4194e9ac3ae17f019 100644 (file)
@@ -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;