aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi
diff options
context:
space:
mode:
authorEliot Blennerhassett <eliot@blennerhassett.gen.nz>2014-12-17 23:57:13 -0500
committerTakashi Iwai <tiwai@suse.de>2014-12-18 02:40:06 -0500
commit43986431246fdaa534822b9cbe9dafed94eab004 (patch)
tree6a04cf45eb1fac944f5ce88d8f6f3e3afecf836d /sound/pci/asihpi
parentc99b9e853d3951fe521cc7b2357eec93d5c16246 (diff)
ALSA: asihpi: relax firmware version check
Some products firmware is no longer being updated e.g. dsp5000, dsp8700 but it should continue to work with updated HPI versions. Avoid regression by allowing this firmware to be loaded as long as major version is the same. Warn about mismatching versions, as matching versions are preferred. Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi')
-rw-r--r--sound/pci/asihpi/hpidspcd.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c
index ac9163770013..3603c24f34d2 100644
--- a/sound/pci/asihpi/hpidspcd.c
+++ b/sound/pci/asihpi/hpidspcd.c
@@ -1,8 +1,9 @@
1/***********************************************************************/ 1/***********************************************************************
2/**
3 2
4 AudioScience HPI driver 3 AudioScience HPI driver
5 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 4 Functions for reading DSP code using hotplug firmware loader
5
6 Copyright (C) 1997-2014 AudioScience Inc. <support@audioscience.com>
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of version 2 of the GNU General Public License as 9 it under the terms of version 2 of the GNU General Public License as
@@ -17,11 +18,7 @@
17 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 20
20\file 21***********************************************************************/
21Functions for reading DSP code using
22hotplug firmware loader from individual dsp code files
23*/
24/***********************************************************************/
25#define SOURCEFILE_NAME "hpidspcd.c" 22#define SOURCEFILE_NAME "hpidspcd.c"
26#include "hpidspcd.h" 23#include "hpidspcd.h"
27#include "hpidebug.h" 24#include "hpidebug.h"
@@ -68,17 +65,18 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
68 goto error2; 65 goto error2;
69 } 66 }
70 67
71 if ((header.version >> 9) != (HPI_VER >> 9)) { 68 if (HPI_VER_MAJOR(header.version) != HPI_VER_MAJOR(HPI_VER)) {
72 /* Consider even and subsequent odd minor versions to be compatible */ 69 /* Major version change probably means Host-DSP protocol change */
73 dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n", 70 dev_err(&dev->dev,
71 "Incompatible firmware version DSP image %X != Driver %X\n",
74 header.version, HPI_VER); 72 header.version, HPI_VER);
75 goto error2; 73 goto error2;
76 } 74 }
77 75
78 if (header.version != HPI_VER) { 76 if (header.version != HPI_VER) {
79 dev_info(&dev->dev, 77 dev_warn(&dev->dev,
80 "Firmware: release version mismatch DSP image %X != Driver %X\n", 78 "Firmware version mismatch: DSP image %X != Driver %X\n",
81 header.version, HPI_VER); 79 header.version, HPI_VER);
82 } 80 }
83 81
84 HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); 82 HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);