162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci#ifndef __SOUND_TLV_H 362306a36Sopenharmony_ci#define __SOUND_TLV_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * Advanced Linux Sound Architecture - ALSA - Driver 762306a36Sopenharmony_ci * Copyright (c) 2006 by Jaroslav Kysela <perex@perex.cz> 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include <uapi/sound/tlv.h> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* For historical reasons, these macros are aliases to the ones in UAPI. */ 1362306a36Sopenharmony_ci#define TLV_ITEM SNDRV_CTL_TLVD_ITEM 1462306a36Sopenharmony_ci#define TLV_LENGTH SNDRV_CTL_TLVD_LENGTH 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define TLV_CONTAINER_ITEM SNDRV_CTL_TLVD_CONTAINER_ITEM 1762306a36Sopenharmony_ci#define DECLARE_TLV_CONTAINER SNDRV_CTL_TLVD_DECLARE_CONTAINER 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#define TLV_DB_SCALE_MASK SNDRV_CTL_TLVD_DB_SCALE_MASK 2062306a36Sopenharmony_ci#define TLV_DB_SCALE_MUTE SNDRV_CTL_TLVD_DB_SCALE_MUTE 2162306a36Sopenharmony_ci#define TLV_DB_SCALE_ITEM SNDRV_CTL_TLVD_DB_SCALE_ITEM 2262306a36Sopenharmony_ci#define DECLARE_TLV_DB_SCALE SNDRV_CTL_TLVD_DECLARE_DB_SCALE 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci#define TLV_DB_MINMAX_ITEM SNDRV_CTL_TLVD_DB_MINMAX_ITEM 2562306a36Sopenharmony_ci#define TLV_DB_MINMAX_MUTE_ITEM SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM 2662306a36Sopenharmony_ci#define DECLARE_TLV_DB_MINMAX SNDRV_CTL_TLVD_DECLARE_DB_MINMAX 2762306a36Sopenharmony_ci#define DECLARE_TLV_DB_MINMAX_MUTE SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#define TLV_DB_LINEAR_ITEM SNDRV_CTL_TLVD_DB_LINEAR_ITEM 3062306a36Sopenharmony_ci#define DECLARE_TLV_DB_LINEAR SNDRV_CTL_TLVD_DECLARE_DB_LINEAR 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#define TLV_DB_RANGE_ITEM SNDRV_CTL_TLVD_DB_RANGE_ITEM 3362306a36Sopenharmony_ci#define DECLARE_TLV_DB_RANGE SNDRV_CTL_TLVD_DECLARE_DB_RANGE 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#define TLV_DB_GAIN_MUTE SNDRV_CTL_TLVD_DB_GAIN_MUTE 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/* 3862306a36Sopenharmony_ci * The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR. 3962306a36Sopenharmony_ci * This is an old fasion and obsoleted by commit bf1d1c9b6179("ALSA: tlv: add 4062306a36Sopenharmony_ci * DECLARE_TLV_DB_RANGE()"). 4162306a36Sopenharmony_ci */ 4262306a36Sopenharmony_ci#define TLV_DB_RANGE_HEAD(num) \ 4362306a36Sopenharmony_ci SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int) 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#endif /* __SOUND_TLV_H */ 46