gnewsense-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gNewSense-users] KFV: sb16_csp_codecs.h non-free?


From: Bake Timmons
Subject: Re: [gNewSense-users] KFV: sb16_csp_codecs.h non-free?
Date: Wed, 25 Jun 2008 17:12:13 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Sam Geeraerts <address@hidden> writes:

> The file sb16_csp_codecs.h in
> http://wiki.gnewsense.org/Kernel/Ubuntu-hardy-linux-ubuntu-modules-2-6-24-16-23--ubuntu--sound--alsa-kernel--isa--sb
> contains a few large arrays of hex values. There are no clarifying
> comments. I don't think this is the preferred form for modification,
> so I would say this is non-free.
>
> Any other opinions? Do I need to ask Creative for clarification?

I would not ask, especially given how it is included in sb16_csp.c:

----------------------------------------------------------------------
#ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
#include "sb16_csp_codecs.h"

static const struct firmware snd_sb_csp_static_programs[] = {
        { .data = mulaw_main, .size = sizeof mulaw_main },
        { .data = alaw_main, .size = sizeof alaw_main },
        { .data = ima_adpcm_init, .size = sizeof ima_adpcm_init },
        { .data = ima_adpcm_playback, .size = sizeof ima_adpcm_playback },
        { .data = ima_adpcm_capture, .size = sizeof ima_adpcm_capture },
};
#endif

static int snd_sb_csp_firmware_load(struct snd_sb_csp *p, int index, int flags)
{
        static const char *const names[] = {
                "sb16/mulaw_main.csp",
                "sb16/alaw_main.csp",
                "sb16/ima_adpcm_init.csp",
                "sb16/ima_adpcm_playback.csp",
                "sb16/ima_adpcm_capture.csp",
        };
        const struct firmware *program;

        BUILD_BUG_ON(ARRAY_SIZE(names) != CSP_PROGRAM_COUNT);
        program = p->csp_programs[index];
        if (!program) {
#ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
                program = &snd_sb_csp_static_programs[index];
#else
                int err = request_firmware(&program, names[index],
                                       p->chip->card->dev);
                if (err < 0)
                        return err;
#endif
                p->csp_programs[index] = program;
        }
        return snd_sb_csp_load(p, program->data, program->size, flags);
}
----------------------------------------------------------------------

What a shame--good catch.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]