fix alsa firmware loading #34865
This commit is contained in:
parent
497b605393
commit
c555df9983
11
PKGBUILD
11
PKGBUILD
|
@ -5,7 +5,7 @@ pkgbase=linux # Build stock -ARCH kernel
|
||||||
#pkgbase=linux-custom # Build kernel with a different name
|
#pkgbase=linux-custom # Build kernel with a different name
|
||||||
_srcname=linux-3.8
|
_srcname=linux-3.8
|
||||||
pkgver=3.8.8
|
pkgver=3.8.8
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://www.kernel.org/"
|
url="http://www.kernel.org/"
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
|
@ -17,13 +17,15 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
||||||
'config' 'config.x86_64'
|
'config' 'config.x86_64'
|
||||||
# standard config files for mkinitcpio ramdisk
|
# standard config files for mkinitcpio ramdisk
|
||||||
'linux.preset'
|
'linux.preset'
|
||||||
'change-default-console-loglevel.patch')
|
'change-default-console-loglevel.patch'
|
||||||
|
'alsa-firmware-loading-3.8.8.patch')
|
||||||
md5sums=('1c738edfc54e7c65faeb90c436104e2f'
|
md5sums=('1c738edfc54e7c65faeb90c436104e2f'
|
||||||
'08cdcef928c2ca402adf1c444a3c43ac'
|
'08cdcef928c2ca402adf1c444a3c43ac'
|
||||||
'838191b72463b4146bc981b602423311'
|
'838191b72463b4146bc981b602423311'
|
||||||
'0bebd8b31487488bd75fe5a1892d0db8'
|
'0bebd8b31487488bd75fe5a1892d0db8'
|
||||||
'eb14dcfd80c00852ef81ded6e826826a'
|
'eb14dcfd80c00852ef81ded6e826826a'
|
||||||
'f3def2cefdcbb954c21d8505d23cc83c')
|
'f3def2cefdcbb954c21d8505d23cc83c'
|
||||||
|
'e2ac681ffa439e969b4c3b4616852454')
|
||||||
|
|
||||||
_kernelname=${pkgbase#linux}
|
_kernelname=${pkgbase#linux}
|
||||||
|
|
||||||
|
@ -36,6 +38,9 @@ prepare() {
|
||||||
# add latest fixes from stable queue, if needed
|
# add latest fixes from stable queue, if needed
|
||||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||||
|
|
||||||
|
# fix alsa firmware loading #34865
|
||||||
|
patch -Np1 -i "${srcdir}/alsa-firmware-loading-3.8.8.patch"
|
||||||
|
|
||||||
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
|
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
|
||||||
# remove this when a Kconfig knob is made available by upstream
|
# remove this when a Kconfig knob is made available by upstream
|
||||||
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
|
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
|
||||||
|
index f841ba4..dfb42ca 100644
|
||||||
|
--- a/include/sound/emu10k1.h
|
||||||
|
+++ b/include/sound/emu10k1.h
|
||||||
|
@@ -1787,6 +1787,7 @@ struct snd_emu10k1 {
|
||||||
|
unsigned int next_free_voice;
|
||||||
|
|
||||||
|
const struct firmware *firmware;
|
||||||
|
+ const struct firmware *dock_fw;
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM_SLEEP
|
||||||
|
unsigned int *saved_ptr;
|
||||||
|
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
|
||||||
|
index e6b0166..bdd888e 100644
|
||||||
|
--- a/sound/pci/emu10k1/emu10k1_main.c
|
||||||
|
+++ b/sound/pci/emu10k1/emu10k1_main.c
|
||||||
|
@@ -657,14 +657,14 @@ static int snd_emu10k1_cardbus_init(struct snd_emu10k1 *emu)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu)
|
||||||
|
+static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu,
|
||||||
|
+ const struct firmware *fw_entry)
|
||||||
|
{
|
||||||
|
int n, i;
|
||||||
|
int reg;
|
||||||
|
int value;
|
||||||
|
unsigned int write_post;
|
||||||
|
unsigned long flags;
|
||||||
|
- const struct firmware *fw_entry = emu->firmware;
|
||||||
|
|
||||||
|
if (!fw_entry)
|
||||||
|
return -EIO;
|
||||||
|
@@ -725,9 +725,34 @@ static int emu1010_firmware_thread(void *data)
|
||||||
|
/* Return to Audio Dock programming mode */
|
||||||
|
snd_printk(KERN_INFO "emu1010: Loading Audio Dock Firmware\n");
|
||||||
|
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, EMU_HANA_FPGA_CONFIG_AUDIODOCK);
|
||||||
|
- err = snd_emu1010_load_firmware(emu);
|
||||||
|
- if (err != 0)
|
||||||
|
- continue;
|
||||||
|
+
|
||||||
|
+ if (!emu->dock_fw) {
|
||||||
|
+ const char *filename = NULL;
|
||||||
|
+ switch (emu->card_capabilities->emu_model) {
|
||||||
|
+ case EMU_MODEL_EMU1010:
|
||||||
|
+ filename = DOCK_FILENAME;
|
||||||
|
+ break;
|
||||||
|
+ case EMU_MODEL_EMU1010B:
|
||||||
|
+ filename = MICRO_DOCK_FILENAME;
|
||||||
|
+ break;
|
||||||
|
+ case EMU_MODEL_EMU1616:
|
||||||
|
+ filename = MICRO_DOCK_FILENAME;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ if (filename) {
|
||||||
|
+ err = request_firmware(&emu->dock_fw,
|
||||||
|
+ filename,
|
||||||
|
+ &emu->pci->dev);
|
||||||
|
+ if (err)
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (emu->dock_fw) {
|
||||||
|
+ err = snd_emu1010_load_firmware(emu, emu->dock_fw);
|
||||||
|
+ if (err)
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0);
|
||||||
|
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, ®);
|
||||||
|
@@ -862,7 +887,7 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu)
|
||||||
|
filename, emu->firmware->size);
|
||||||
|
}
|
||||||
|
|
||||||
|
- err = snd_emu1010_load_firmware(emu);
|
||||||
|
+ err = snd_emu1010_load_firmware(emu, emu->firmware);
|
||||||
|
if (err != 0) {
|
||||||
|
snd_printk(KERN_INFO "emu1010: Loading Firmware failed\n");
|
||||||
|
return err;
|
||||||
|
@@ -1253,6 +1278,8 @@ static int snd_emu10k1_free(struct snd_emu10k1 *emu)
|
||||||
|
kthread_stop(emu->emu1010.firmware_thread);
|
||||||
|
if (emu->firmware)
|
||||||
|
release_firmware(emu->firmware);
|
||||||
|
+ if (emu->dock_fw)
|
||||||
|
+ release_firmware(emu->dock_fw);
|
||||||
|
if (emu->irq >= 0)
|
||||||
|
free_irq(emu->irq, emu);
|
||||||
|
/* remove reserved page */
|
|
@ -2,7 +2,7 @@
|
||||||
# arg 2: the old package version
|
# arg 2: the old package version
|
||||||
|
|
||||||
KERNEL_NAME=
|
KERNEL_NAME=
|
||||||
KERNEL_VERSION=3.8.8-1-ARCH
|
KERNEL_VERSION=3.8.8-2-ARCH
|
||||||
|
|
||||||
# set a sane PATH to ensure that critical utils like depmod will be found
|
# set a sane PATH to ensure that critical utils like depmod will be found
|
||||||
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
||||||
|
|
Loading…
Reference in New Issue