Skip to contentSkip to conversation

hdsp: allow firmware loading from inside the kernel

PATCH In review Raphaël Doursenaud 3 participants 15 messages May 12, 2009 2 messages not in the archive Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hdsp: allow firmware loading from inside the kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

From: Raphaël Doursenaud <[email protected]>

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.
Also corrected a typo in the comment.

- ---

 sound/pci/rme9652/hdsp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/rme9652/hdsp.c +0 -0
index 314e735..d0d4629 100644

- --- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -402,9 +402,9 @@ MODULE_FIRMWARE("digiface_firmware_rev11.bin");
#define HDSP_DMA_AREA_BYTES ((HDSP_MAX_CHANNELS+1) *
HDSP_CHANNEL_BUFFER_BYTES)
#define HDSP_DMA_AREA_KILOBYTES (HDSP_DMA_AREA_BYTES/1024)

- -/* use hotplug firmeare loader? */
+/* use hotplug firmware loader? */
#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
- -#if !defined(HDSP_USE_HWDEP_LOADER) && !defined(CONFIG_SND_HDSP) +#if !defined(HDSP_USE_HWDEP_LOADER)
#define HDSP_FW_LOADER
#endif
#endif

- --
Raphaël Doursenaud

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJFCQACgkQaZKmNAdXaVVliACaA5BMknMAXgOEN/7YQmWGPwUh uRgAn0BiIwAtGU/AOi+QRn81k8apvHfi
=+4Kw
-----END PGP SIGNATURE-----
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 5 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

#2 lore raw
Quoted 7 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 4 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Why load the digiface firmware? There's three different firmware files for three different io boxes, each has to get it's own firmware.

Flo

Signature · 2 lines
Machines can do the work, so people have time to think.
public key 6C002249          x-hkp://wwwkeys.eu.pgp.net
#3 lore raw

At Tue, 12 May 2009 08:44:26 +0200,

Quoted 11 lines · Florian Faber
Quoted 7 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 4 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Why load the digiface firmware?

Hmm, what are you looking at?
The patch is irrelevant with the firmware choice...

Quoted 2 lines

There's three different firmware files
for three different io boxes, each has to get it's own firmware.

It will.

Takashi

#4 lore raw
In reply to Takashi Iwai

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 4 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.
Hotplugging works: the firmware is reloaded on card access.

- --
Raphaël Doursenaud
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJG34ACgkQaZKmNAdXaVVDeQCfekVHlre0WdPAXjY6X5bkPWzy hLIAnjd2fYwocu+WvvX0yRCUEs3qKv7c
=9v6h
-----END PGP SIGNATURE-----
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#5 lore raw

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 12 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 4 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Quoted 7 lines
Quoted 4 lines

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Takashi

#6 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 16 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 14 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 4 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Quoted 8 lines
Quoted 2 lines

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel.
It's the aim of this patch.
- --
Raphaël Doursenaud
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJIQEACgkQaZKmNAdXaVUiDQCfeGip12B5n6EGpdV/fikLxFvO 4Z0AnA5TvnVnvuR53CFEcGBpW0Gg+roP
=G+3U
-----END PGP SIGNATURE-----
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 28 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 23 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

thanks,

Takashi

#9 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 38 lines · Takashi Iwai

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 26 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Quoted 7 lines

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

thanks,

Takashi

Could you be more specific?
I'm not sure to understand why it could be a problem.
Do you think that if I set FIRMWARE_IN_KERNEL without compiling the firmware(s) in-kernel the request_firmware() will not resolve and cause an error?

- --
Raphaël Doursenaud
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJJGQACgkQaZKmNAdXaVUiPwCg1A/s+SS2qCwRDc+D0eMRXT7V HAEAn0/lJLwFZaoyhDlSFsPhNmaHTNHM
=Tc2L
-----END PGP SIGNATURE-----
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#10 lore raw

At Tue, 12 May 2009 09:25:27 +0200,

Quoted 47 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 42 lines · Takashi Iwai

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 26 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

Quoted 8 lines
Quoted 3 lines

thanks,

Takashi

Could you be more specific?
I'm not sure to understand why it could be a problem.
Do you think that if I set FIRMWARE_IN_KERNEL without compiling the firmware(s) in-kernel the request_firmware() will not resolve and cause an error?

Yes, exactly.
request_firmware() shall fail in that case likely after a long time-out (unless you have the firmware files in initrd) because there is really no file / data available at the time it's called. And I'm not sure whether this could lead to a fatal operation error.

Takashi

#11 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 56 lines · Takashi Iwai

At Tue, 12 May 2009 09:25:27 +0200,

Quoted 45 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 41 lines · Takashi Iwai

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 26 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

Quoted 8 lines
Quoted 3 lines

thanks,

Takashi

Could you be more specific?
I'm not sure to understand why it could be a problem.
Do you think that if I set FIRMWARE_IN_KERNEL without compiling the firmware(s) in-kernel the request_firmware() will not resolve and cause an error?

Quoted 8 lines

Yes, exactly.
request_firmware() shall fail in that case likely after a long time-out (unless you have the firmware files in initrd) because there is really no file / data available at the time it's called. And I'm not sure whether this could lead to a fatal operation error.

Takashi

AFAIK this is handled in the code (from line 5080) and should lead to "Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader" I'm building a kernel to test that case.

- --
Raphaël Doursenaud
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJKHwACgkQaZKmNAdXaVXaHACgiahjXpvtV7ddBmRQORql5EyH FsIAnRAubFoZKqnTY87CPWZByK/2RLL9
=nKtH
-----END PGP SIGNATURE-----
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw

At Tue, 12 May 2009 09:41:36 +0200,

Quoted 68 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 63 lines · Takashi Iwai

At Tue, 12 May 2009 09:25:27 +0200,

Quoted 45 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 41 lines · Takashi Iwai

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 26 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

Quoted 8 lines
Quoted 3 lines

thanks,

Takashi

Could you be more specific?
I'm not sure to understand why it could be a problem.
Do you think that if I set FIRMWARE_IN_KERNEL without compiling the firmware(s) in-kernel the request_firmware() will not resolve and cause an error?

Yes, exactly.
request_firmware() shall fail in that case likely after a long time-out (unless you have the firmware files in initrd) because there is really no file / data available at the time it's called. And I'm not sure whether this could lead to a fatal operation error.

Quoted 3 lines
Quoted 1 line

Takashi

AFAIK this is handled in the code (from line 5080) and should lead to "Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader"

Yep, a fallback mechanism is found in hdsp driver itself. But the driver probe hangs for too long time, and I'm just worried about its influence on the whole kernel boot-up.

Quoted 1 line

I'm building a kernel to test that case.

Thanks.

Takashi

#14 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 76 lines · Takashi Iwai

At Tue, 12 May 2009 09:41:36 +0200,

Quoted 66 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 62 lines · Takashi Iwai

At Tue, 12 May 2009 09:25:27 +0200,

Quoted 45 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 41 lines · Takashi Iwai

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 26 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

Quoted 8 lines
Quoted 3 lines

thanks,

Takashi

Could you be more specific?
I'm not sure to understand why it could be a problem.
Do you think that if I set FIRMWARE_IN_KERNEL without compiling the firmware(s) in-kernel the request_firmware() will not resolve and cause an error?

Yes, exactly.
request_firmware() shall fail in that case likely after a long time-out (unless you have the firmware files in initrd) because there is really no file / data available at the time it's called. And I'm not sure whether this could lead to a fatal operation error.

Quoted 3 lines
Quoted 1 line

Takashi

AFAIK this is handled in the code (from line 5080) and should lead to "Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader"

Yep, a fallback mechanism is found in hdsp driver itself. But the driver probe hangs for too long time, and I'm just worried about its influence on the whole kernel boot-up.

Quoted 6 lines
Quoted 1 line

I'm building a kernel to test that case.

Thanks.

Takashi

Wow, you're right! Didn't think about that...

It hangs for about 45s on :
Hammerfall-DSP: wait for FIFO status <= 0 failed after 30 iterations RME Hammerfall DSP 0000:05:02.0: firmware: requesting multiface_firmware_rev11.bin

before going on with :
Hammerfall-DSP: cannot load firmware multiface_firmware_rev11.bin
Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader
Hammerfall-DSP: card initialization pending : waiting for firmware

I wonder what would be the best way to deal with that while still enabling in-kernel firmware.
- --
Raphaël Doursenaud
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJLMwACgkQaZKmNAdXaVW94gCbBll+cHSt1/NhN7/g6UTsyb6N y9QAniPLwniVOp5dxHGOl9pI9gTN+tdv
=5umi
-----END PGP SIGNATURE-----
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#15 lore raw

At Tue, 12 May 2009 10:01:20 +0200,

Quoted 91 lines · Raphaël Doursenaud
Quoted 76 lines · Takashi Iwai

At Tue, 12 May 2009 09:41:36 +0200,

Quoted 66 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 62 lines · Takashi Iwai

At Tue, 12 May 2009 09:25:27 +0200,

Quoted 45 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 41 lines · Takashi Iwai

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 26 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

Quoted 8 lines
Quoted 3 lines

thanks,

Takashi

Could you be more specific?
I'm not sure to understand why it could be a problem.
Do you think that if I set FIRMWARE_IN_KERNEL without compiling the firmware(s) in-kernel the request_firmware() will not resolve and cause an error?

Yes, exactly.
request_firmware() shall fail in that case likely after a long time-out (unless you have the firmware files in initrd) because there is really no file / data available at the time it's called. And I'm not sure whether this could lead to a fatal operation error.

Quoted 3 lines
Quoted 1 line

Takashi

AFAIK this is handled in the code (from line 5080) and should lead to "Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader"

Yep, a fallback mechanism is found in hdsp driver itself. But the driver probe hangs for too long time, and I'm just worried about its influence on the whole kernel boot-up.

Quoted 6 lines
Quoted 1 line

I'm building a kernel to test that case.

Thanks.

Takashi

Wow, you're right! Didn't think about that...

It hangs for about 45s on :
Hammerfall-DSP: wait for FIFO status <= 0 failed after 30 iterations RME Hammerfall DSP 0000:05:02.0: firmware: requesting multiface_firmware_rev11.bin

Quoted 4 lines

before going on with :
Hammerfall-DSP: cannot load firmware multiface_firmware_rev11.bin
Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader
Hammerfall-DSP: card initialization pending : waiting for firmware

OK, so it doesn't lead to any critical error? Then it's better than the worst case I thought of :)

Quoted 2 lines

I wonder what would be the best way to deal with that while still enabling in-kernel firmware.

Well, it's basically a problem of the request_firmware() itself, so we can't fix the behavior properly in the driver side. There is an option to use *_nowait() call, but this will end up with a mess of code flow, I'm afraid.

So, I'm going to apply your patch. But, maybe we should add a warning in Kconfig comment, such as

comment "Don't forget to add built-in firmwares for HDSP driver"
depends on SND_HDSP=y

or so... Suggestions of a better text are appreciated.

thanks,

Takashi

#16 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 112 lines · Takashi Iwai

At Tue, 12 May 2009 10:01:20 +0200,

Quoted 88 lines · Raphaël Doursenaud
Quoted 75 lines · Takashi Iwai

At Tue, 12 May 2009 09:41:36 +0200,

Quoted 66 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 62 lines · Takashi Iwai

At Tue, 12 May 2009 09:25:27 +0200,

Quoted 45 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 41 lines · Takashi Iwai

At Tue, 12 May 2009 09:05:19 +0200,

Quoted 26 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Takashi Iwai

At Tue, 12 May 2009 08:47:29 +0200,

Quoted 8 lines · Raphaël Doursenaud

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Takashi Iwai

At Tue, 12 May 2009 08:16:08 +0200,

Quoted 2 lines · Raphaël Doursenaud

From: Raphaël Doursenaud <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver.

Did it really work without problems?

Takashi

Tested over the weekend with two multifaces in my DAW. Got no problem.

Interesting.
Did you build the firmware file into the kernel, or not?

Quoted 5 lines
Quoted 1 line

Takashi

Yes I built all hdsp fimware files (multiface_firmware.bin multiface_firmware_rev11.bin digiface_firmware.bin digiface_firmware_rev11.bin) into the kernel. It's the aim of this patch.

Well, the problem I'm concerned is that the driver can be compiled in even if you have no built-in firmware. And there is no restriction or dependency check in Kconfig, so far.

Could you test how the kernel behaves without the built-in firmware? Does it hang or give any critical error?

Quoted 8 lines
Quoted 3 lines

thanks,

Takashi

Could you be more specific?
I'm not sure to understand why it could be a problem.
Do you think that if I set FIRMWARE_IN_KERNEL without compiling the firmware(s) in-kernel the request_firmware() will not resolve and cause an error?

Yes, exactly.
request_firmware() shall fail in that case likely after a long time-out (unless you have the firmware files in initrd) because there is really no file / data available at the time it's called. And I'm not sure whether this could lead to a fatal operation error.

Quoted 3 lines
Quoted 1 line

Takashi

AFAIK this is handled in the code (from line 5080) and should lead to "Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader"

Yep, a fallback mechanism is found in hdsp driver itself. But the driver probe hangs for too long time, and I'm just worried about its influence on the whole kernel boot-up.

Quoted 5 lines
Quoted 1 line

I'm building a kernel to test that case.

Thanks.

Takashi

Wow, you're right! Didn't think about that...

It hangs for about 45s on :
Hammerfall-DSP: wait for FIFO status <= 0 failed after 30 iterations RME Hammerfall DSP 0000:05:02.0: firmware: requesting multiface_firmware_rev11.bin

Quoted 4 lines

before going on with :
Hammerfall-DSP: cannot load firmware multiface_firmware_rev11.bin
Hammerfall-DSP: couldn't get firmware from userspace. try using hdsploader
Hammerfall-DSP: card initialization pending : waiting for firmware

OK, so it doesn't lead to any critical error? Then it's better than the worst case I thought of :)

Quoted 2 lines

I wonder what would be the best way to deal with that while still enabling in-kernel firmware.

Well, it's basically a problem of the request_firmware() itself, so we can't fix the behavior properly in the driver side. There is an option to use *_nowait() call, but this will end up with a mess of code flow, I'm afraid.

So, I'm going to apply your patch. But, maybe we should add a warning in Kconfig comment, such as

comment "Don't forget to add built-in firmwares for HDSP driver"
depends on SND_HDSP=y

Quoted 6 lines

or so... Suggestions of a better text are appreciated.

thanks,

Takashi

mmm sounds good to me.
With the patch I'm about to propose to correct the firmwares path it should fit most situations.

Thanks a lot for your input!

- --
Raphaël Doursenaud
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJO9oACgkQaZKmNAdXaVU+gwCgmJz3c5YMbtF4KMYkSFX/8m21 L9cAnRc25qVBD57HeUtriA/tDDBI6vO7
=RnGG
-----END PGP SIGNATURE-----
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel