Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a2a736a authored by David Woodhouse's avatar David Woodhouse Committed by David Woodhouse
Browse files

ttusb-budget: use request_firmware()

parent 79682499
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <linux/errno.h>
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/firmware.h>

#include "dvb_frontend.h"
#include "dmxdev.h"
@@ -285,13 +286,19 @@ static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num
	return i;
}

#include "dvb-ttusb-dspbootcode.h"

static int ttusb_boot_dsp(struct ttusb *ttusb)
{
	const struct firmware *fw;
	int i, err;
	u8 b[40];

	err = request_firmware(&fw, "ttusb-budget/dspbootcode.bin",
			       &ttusb->dev->dev);
	if (err) {
		printk(KERN_ERR "ttusb-budget: failed to request firmware\n");
		return err;
	}

	/* BootBlock */
	b[0] = 0xaa;
	b[2] = 0x13;
@@ -299,8 +306,8 @@ static int ttusb_boot_dsp(struct ttusb *ttusb)

	/* upload dsp code in 32 byte steps (36 didn't work for me ...) */
	/* 32 is max packet size, no messages should be splitted. */
	for (i = 0; i < sizeof(dsp_bootcode); i += 28) {
		memcpy(&b[4], &dsp_bootcode[i], 28);
	for (i = 0; i < fw->size; i += 28) {
		memcpy(&b[4], &fw->data[i], 28);

		b[1] = ++ttusb->c;

@@ -1820,3 +1827,4 @@ module_exit(ttusb_exit);
MODULE_AUTHOR("Holger Waechtler <holger@convergence.de>");
MODULE_DESCRIPTION("TTUSB DVB Driver");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE("ttusb-budget/dspbootcode.bin");
+0 −1644

File deleted.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ fw-external-y := $(subst ",,$(CONFIG_EXTRA_FIRMWARE))
# accurate. In the latter case it doesn't matter -- it'll use $(fw-shipped-all).
# But be aware that the config file might not be included at all.

fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin
fw-shipped-$(CONFIG_SMCTR) += tr_smctr.bin
fw-shipped-$(CONFIG_SND_KORG1212) += korg/k1212.dsp
fw-shipped-$(CONFIG_SND_MAESTRO3) += ess/maestro3_assp_kernel.fw \
+10 −0
Original line number Diff line number Diff line
@@ -70,3 +70,13 @@ Licence: Unknown
Found in hex form in the kernel source.

--------------------------------------------------------------------------

Driver: ttusb-budget -- Technotrend/Hauppauge Nova-USB devices

File: ttusb-budget/dspbootcode.bin

Licence: Unknown

Found in hex form in the kernel source.

--------------------------------------------------------------------------
+820 −0

File added.

Preview size limit exceeded, changes collapsed.