]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Add linear-volume handling in amixer
authorTakashi Iwai <tiwai@suse.de>
Mon, 28 Aug 2006 11:28:46 +0000 (13:28 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Aug 2006 11:28:46 +0000 (13:28 +0200)
Added the handling of linear-volume in amixer TLV decoder.

amixer/amixer.c

index 691c1c5f58fb5d422cd003241c4a3db58543ea93..1c242303a9b8a3262075bab94d23a22ea7ba5f14 100644 (file)
@@ -498,6 +498,22 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
                        printf(",mute=%i", (tlv[3] >> 16) & 1);
                }
                break;
+#ifdef SND_CTL_TLVT_DB_LINEAR
+       case SND_CTL_TLVT_DB_LINEAR:
+               printf("dBlinear-");
+               if (size != 2 * sizeof(unsigned int)) {
+                       while (size > 0) {
+                               printf("0x%x", tlv[idx++]);
+                               size -= sizeof(unsigned int);
+                       }
+               } else {
+                       printf("min=");
+                       print_dB(tlv[2]);
+                       printf(",max=");
+                       print_dB(tlv[3]);
+               }
+               break;
+#endif
        default:
                printf("unk-%i-", type);
                while (size > 0) {