#ifndef DOC_HIDDEN
#define SNDRV_FILE_CONTROL ALSA_DEVICE_DIRECTORY "controlC%i"
-#define SNDRV_CTL_VERSION_MAX SNDRV_PROTOCOL_VERSION(2, 0, 3)
+#define SNDRV_CTL_VERSION_MAX SNDRV_PROTOCOL_VERSION(2, 0, 4)
typedef struct {
int card;
int fd;
+ unsigned int protocol;
} snd_ctl_hw_t;
#endif /* DOC_HIDDEN */
snd_ctl_hw_t *hw = handle->private_data;
struct sndrv_ctl_tlv *xtlv;
+ /* we don't support TLV on protocol ver 2.0.3 or earlier */
+ if (hw->protocol < SNDRV_PROTOCOL_VERSION(2, 0, 4))
+ return -ENXIO;
+
switch (op_flag) {
case -1: inum = SNDRV_CTL_IOCTL_TLV_COMMAND; break;
case 0: inum = SNDRV_CTL_IOCTL_TLV_READ; break;
}
hw->card = card;
hw->fd = fd;
+ hw->protocol = ver;
err = snd_ctl_new(&ctl, SND_CTL_TYPE_HW, name);
if (err < 0) {