From 4816300effd0e425779f66265fcc5825d5898ec7 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Mon, 21 Nov 2016 17:54:51 -0800 Subject: [PATCH] Asoc: Add audio backend to hwdep interface Add audio backend to hwdep interface. This is to provide ioctl interface to communicate to routing driver. Currently codec driver uses request_firmware to get calibration data but as this firmware file is also written by userspace process after bootup, it is not recommended to use request_firmware. ALSA core provides mechanism to get hardware dependent data using hwdep nodes. Codec will use aforementioned nodes to get calibration data from userspace. This commit adds hwdep interface for codec calibration. Change-Id: I9abeb9cdf3ea58d9fac13eef5d849c8aadf1bfbf Signed-off-by: Subhash Chandra Bose Naripeddy Signed-off-by: Krishnankutty Kolathappilly Signed-off-by: Banajit Goswami Signed-off-by: Sudheer Papothi Signed-off-by: Meng Wang --- include/uapi/sound/asound.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 8f8a6467095e..b127650c1cb5 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -111,11 +111,20 @@ enum { SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */ SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */ SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */ +#ifdef CONFIG_AUDIO_QGKI + SNDRV_HWDEP_IFACE_AUDIO_CODEC, /* codec Audio Control */ /* Don't forget to change the following: */ + SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_AUDIO_CODEC +#else SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE +#endif }; +#ifdef CONFIG_AUDIO_QGKI +#define SNDRV_HWDEP_IFACE_AUDIO_CODEC SNDRV_HWDEP_IFACE_AUDIO_CODEC +#endif + struct snd_hwdep_info { unsigned int device; /* WR: device number */ int card; /* R: card number */