summaryrefslogtreecommitdiff
path: root/sound/firewire/bebob/bebob.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-06-14 12:49:33 +0900
committerTakashi Iwai <tiwai@suse.de>2015-06-15 13:37:26 +0200
commit7b4d7dcfa89e75f69547fbacfbf09a1d6c242a6b (patch)
tree8a06a1ccbf539447fee4245ca1abbaa2459d3f15 /sound/firewire/bebob/bebob.c
parent05773792716e5a75b0f4bf4edcdc1e9c3b199ab8 (diff)
ALSA: bebob: add 'version' member for BeBoB protocol version
BeBoB installed devices have BeBoB register area. This area stores basic information about its firmware. A register has its protocol version. This commit adds 'version' member and store the device's protocol version to handle v3 quirks in following commits. Tested-by: Kim Tore Jensen <kim@incendio.no> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob.c')
-rw-r--r--sound/firewire/bebob/bebob.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c
index e71bd353f4e7..920571bc3c60 100644
--- a/sound/firewire/bebob/bebob.c
+++ b/sound/firewire/bebob/bebob.c
@@ -33,6 +33,7 @@ static DEFINE_MUTEX(devices_mutex);
static DECLARE_BITMAP(devices_used, SNDRV_CARDS);
/* Offsets from information register. */
+#define INFO_OFFSET_BEBOB_VERSION 0x08
#define INFO_OFFSET_GUID 0x10
#define INFO_OFFSET_HW_MODEL_ID 0x18
#define INFO_OFFSET_HW_MODEL_REVISION 0x1c
@@ -73,6 +74,7 @@ name_device(struct snd_bebob *bebob, unsigned int vendor_id)
u32 hw_id;
u32 data[2] = {0};
u32 revision;
+ u32 version;
int err;
/* get vendor name from root directory */
@@ -105,6 +107,12 @@ name_device(struct snd_bebob *bebob, unsigned int vendor_id)
if (err < 0)
goto end;
+ err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_BEBOB_VERSION,
+ &version);
+ if (err < 0)
+ goto end;
+ bebob->version = version;
+
strcpy(bebob->card->driver, "BeBoB");
strcpy(bebob->card->shortname, model);
strcpy(bebob->card->mixername, model);