[alsa-devel] [PATCH 1/3] ALSA: asihpi: relax firmware version check
From: Eliot Blennerhassett eliot@blennerhassett.gen.nz
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 --- sound/pci/asihpi/hpidspcd.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c index ac91637..3603c24 100644 --- a/sound/pci/asihpi/hpidspcd.c +++ b/sound/pci/asihpi/hpidspcd.c @@ -1,8 +1,9 @@ -/***********************************************************************/ -/** +/***********************************************************************
AudioScience HPI driver - Copyright (C) 1997-2011 AudioScience Inc. support@audioscience.com + Functions for reading DSP code using hotplug firmware loader + + Copyright (C) 1997-2014 AudioScience Inc. support@audioscience.com
This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as @@ -17,11 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-\file -Functions for reading DSP code using -hotplug firmware loader from individual dsp code files -*/ -/***********************************************************************/ +***********************************************************************/ #define SOURCEFILE_NAME "hpidspcd.c" #include "hpidspcd.h" #include "hpidebug.h" @@ -68,17 +65,18 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, goto error2; }
- if ((header.version >> 9) != (HPI_VER >> 9)) { - /* Consider even and subsequent odd minor versions to be compatible */ - dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n", + if (HPI_VER_MAJOR(header.version) != HPI_VER_MAJOR(HPI_VER)) { + /* Major version change probably means Host-DSP protocol change */ + dev_err(&dev->dev, + "Incompatible firmware version DSP image %X != Driver %X\n", header.version, HPI_VER); goto error2; }
if (header.version != HPI_VER) { - dev_info(&dev->dev, - "Firmware: release version mismatch DSP image %X != Driver %X\n", - header.version, HPI_VER); + dev_warn(&dev->dev, + "Firmware version mismatch: DSP image %X != Driver %X\n", + header.version, HPI_VER); }
HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
From: Eliot Blennerhassett eliot@blennerhassett.gen.nz
Increase size allocated for PAD (programme associated data) control. This is used by newer tuner products.
Signed-off-by: Eliot Blennerhassett eliot@blennerhassett.gen.nz --- sound/pci/asihpi/hpi_internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h index 48380ce..aeea679 100644 --- a/sound/pci/asihpi/hpi_internal.h +++ b/sound/pci/asihpi/hpi_internal.h @@ -1367,9 +1367,9 @@ struct hpi_control_cache_single { struct hpi_control_cache_pad { struct hpi_control_cache_info i; u32 field_valid_flags; - u8 c_channel[8]; - u8 c_artist[40]; - u8 c_title[40]; + u8 c_channel[40]; + u8 c_artist[100]; + u8 c_title[100]; u8 c_comment[200]; u32 pTY; u32 pI;
From: Eliot Blennerhassett eliot@blennerhassett.gen.nz
This corresponds with updated asihpi firmware in alsa-firmware repo
Signed-off-by: Eliot Blennerhassett eliot@blennerhassett.gen.nz --- sound/pci/asihpi/hpi_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/pci/asihpi/hpi_version.h b/sound/pci/asihpi/hpi_version.h index e9146e5..6623ab1 100644 --- a/sound/pci/asihpi/hpi_version.h +++ b/sound/pci/asihpi/hpi_version.h @@ -11,13 +11,13 @@ Production releases have even minor version. /* Use single digits for versions less that 10 to avoid octal. */ /* *** HPI_VER is the only edit required to update version *** */ /** HPI version */ -#define HPI_VER HPI_VERSION_CONSTRUCTOR(4, 10, 1) +#define HPI_VER HPI_VERSION_CONSTRUCTOR(4, 14, 3)
/** HPI version string in dotted decimal format */ -#define HPI_VER_STRING "4.10.01" +#define HPI_VER_STRING "4.14.03"
/** Library version as documented in hpi-api-versions.txt */ -#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(10, 2, 0) +#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(10, 4, 0)
/** Construct hpi version number from major, minor, release numbers */ #define HPI_VERSION_CONSTRUCTOR(maj, min, r) ((maj << 16) + (min << 8) + r)
Hi Takashi,
there is a corresponding update to alsa-firmware/asihpi to go with the new HPI version.
You can download the new firmware here (or would you prefer a binary patch generated from the git repo?)
https://drive.google.com/open?id=0B8ccScr8Ew74LVVpYnNlZlc0ZUE&authuser=0
If possible can you remove dsp2400.bin from the repo, it is not used by any plug-in adapter (it is meant for a networked device, and got into alsa-firmware by mistake)
Contents of download:
asihpi_firmware.7z Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ --------------- 2014-10-04 02:32:40 ....A 186764 1564580 dsp5000.bin 2014-12-04 03:33:21 ....A 853340 dsp6200.bin 2014-12-04 03:27:52 ....A 59388 dsp6205.bin 2014-12-04 03:35:44 ....A 646672 dsp6400.bin 2014-12-04 03:38:11 ....A 649636 dsp6600.bin 2014-12-04 03:41:05 ....A 1565436 dsp8900.bin 2014-10-04 02:41:20 ....A 365476 144838 dsp8700.bin ------------------- ----- ------------ ------------ ---------------- 4326712 1709418 7 files, 0 folders
-- Eliot P.S: I haven't forgotten your request to replace tasklet in asihpi
At Thu, 18 Dec 2014 18:03:37 +1300, Eliot Blennerhassett wrote:
Hi Takashi,
there is a corresponding update to alsa-firmware/asihpi to go with the new HPI version.
You can download the new firmware here (or would you prefer a binary patch generated from the git repo?)
https://drive.google.com/open?id=0B8ccScr8Ew74LVVpYnNlZlc0ZUE&authuser=0
If possible can you remove dsp2400.bin from the repo, it is not used by any plug-in adapter (it is meant for a networked device, and got into alsa-firmware by mistake)
Done.
Takashi
Contents of download:
asihpi_firmware.7z Date Time Attr Size Compressed Name
2014-10-04 02:32:40 ....A 186764 1564580 dsp5000.bin 2014-12-04 03:33:21 ....A 853340 dsp6200.bin 2014-12-04 03:27:52 ....A 59388 dsp6205.bin 2014-12-04 03:35:44 ....A 646672 dsp6400.bin 2014-12-04 03:38:11 ....A 649636 dsp6600.bin 2014-12-04 03:41:05 ....A 1565436 dsp8900.bin 2014-10-04 02:41:20 ....A 365476 144838 dsp8700.bin
4326712 1709418 7 files, 0 folders
-- Eliot P.S: I haven't forgotten your request to replace tasklet in asihpi
At Thu, 18 Dec 2014 17:57:13 +1300, eliot@blennerhassett.gen.nz wrote:
From: Eliot Blennerhassett eliot@blennerhassett.gen.nz
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
Applied all three patches.
thanks,
Takashi
sound/pci/asihpi/hpidspcd.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c index ac91637..3603c24 100644 --- a/sound/pci/asihpi/hpidspcd.c +++ b/sound/pci/asihpi/hpidspcd.c @@ -1,8 +1,9 @@ -/***********************************************************************/ -/** +/***********************************************************************
AudioScience HPI driver
- Copyright (C) 1997-2011 AudioScience Inc. support@audioscience.com
Functions for reading DSP code using hotplug firmware loader
Copyright (C) 1997-2014 AudioScience Inc. support@audioscience.com
This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as
@@ -17,11 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-\file -Functions for reading DSP code using -hotplug firmware loader from individual dsp code files -*/ -/***********************************************************************/ +***********************************************************************/ #define SOURCEFILE_NAME "hpidspcd.c" #include "hpidspcd.h" #include "hpidebug.h" @@ -68,17 +65,18 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, goto error2; }
- if ((header.version >> 9) != (HPI_VER >> 9)) {
/* Consider even and subsequent odd minor versions to be compatible */
dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n",
if (HPI_VER_MAJOR(header.version) != HPI_VER_MAJOR(HPI_VER)) {
/* Major version change probably means Host-DSP protocol change */
dev_err(&dev->dev,
"Incompatible firmware version DSP image %X != Driver %X\n", header.version, HPI_VER);
goto error2; }
if (header.version != HPI_VER) {
dev_info(&dev->dev,
"Firmware: release version mismatch DSP image %X != Driver %X\n",
header.version, HPI_VER);
dev_warn(&dev->dev,
"Firmware version mismatch: DSP image %X != Driver %X\n",
header.version, HPI_VER);
}
HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
-- 1.9.1
participants (3)
-
Eliot Blennerhassett
-
eliot@blennerhassett.gen.nz
-
Takashi Iwai