Page 1 of 1

cuckoo hacks/patches

Posted: Sun Jan 26, 2014 9:45 pm
by ikk_pl
Greetings everybody,

I recently started hacking away at cuckoo in an attempt to make it at least work. I'll probably keep messing with it in the future, but decided to drop here some small fixes that instead of making my kernel oops, at least allow to test the sound with aplay. Relevant patches are cuckoo.h.patch.txt (from this thread) and cuckoo_pcm.h.patch.txt. cuckoo is, of course, still nowhere near fixed (as in, my vlc hangs when attempting to use the virtual card), but it's a start.

As for installation, the tar of ALSA shipped with the latest stable release appears to be useless on newer kernels - it caused mine to oops. It seems, though, that the ALSA from newer kernels (3.12.6 here) "just works". To install the module you need to compile ALSA as a module, selecting at least one driver so that the kernel flag SND_PCM is set, blacklist that driver, and then compile and install cuckoo as usual.

Oddities:

- For some reason "cuckoo" module appears in lsmod with quote marks, and rmmod needs to include them. I'd love to see if it isn't just my problem.
- edit - updated the dma buffer fix, it is probably done the right way now.

I'm planning to spend some time understanding and hacking cuckoo, and will probably put any subsequent patches in this thread. If you've got any resources (links to documentation etc.), that'd be great. Also, feel free to test it - carefully.

Re: cuckoo hacks/patches

Posted: Thu Jan 30, 2014 1:13 pm
by ikk_pl
Update - fixed broken frame format detection. Collective patch (from unmodified cuckoo) in attachments.

Also, is the oss devel mailing list still active? The links on the main site appear to be broken.

Re: cuckoo hacks/patches

Posted: Thu Jan 30, 2014 6:37 pm
by cesium
Nice to see someone is working on it - when I tried testing it once, I recall having the quote issue too.. (and it wasn't too useful either). Current mailing list is at the sourceforge project. Can't recall any docs on cuckoo.

Re: cuckoo hacks/patches

Posted: Mon Feb 17, 2014 2:55 am
by keantoken
I'd really like to see Cuckoo working as well. Thanks for this!

Re: cuckoo hacks/patches

Posted: Thu Feb 20, 2014 12:48 am
by keantoken
I tried this patch and this is what I get:

Code: Select all

$ sudo make install
make -C /lib/modules/3.12-11.dmz.1-liquorix-amd64/build M=/usr/lib/oss/cuckoo modules
make[1]: Entering directory `/usr/src/linux-headers-3.12-11.dmz.1-liquorix-amd64'
  CC [M]  /usr/lib/oss/cuckoo/cuckoo.o
  CC [M]  /usr/lib/oss/cuckoo/cuckoo_pcm.o
/usr/lib/oss/cuckoo/cuckoo_pcm.c:123:3: warning: ‘format_oss_to_alsa’ defined but not used [-Wunused-function]
   format_oss_to_alsa(unsigned int format)
   ^
  CC [M]  /usr/lib/oss/cuckoo/cuckoo_mixer.o
/usr/lib/oss/cuckoo/cuckoo_mixer.c: In function ‘get_mixer_info’:
/usr/lib/oss/cuckoo/cuckoo_mixer.c:142:1: warning: the frame size of 3760 bytes is larger than 2048 bytes [-Wframe-larger-than=]
 }
 ^
  Building modules, stage 2.
  MODPOST 3 modules
WARNING: "oss_strncpy" [/usr/lib/oss/cuckoo/cuckoo_pcm.ko] undefined!
WARNING: "num_audio_devfiles" [/usr/lib/oss/cuckoo/cuckoo_pcm.ko] undefined!
WARNING: "oss_audio_open_engine" [/usr/lib/oss/cuckoo/cuckoo_pcm.ko] undefined!
WARNING: "audio_devfiles" [/usr/lib/oss/cuckoo/cuckoo_pcm.ko] undefined!
WARNING: "oss_memset" [/usr/lib/oss/cuckoo/cuckoo_pcm.ko] undefined!
WARNING: "oss_audio_release" [/usr/lib/oss/cuckoo/cuckoo_pcm.ko] undefined!
WARNING: "touch_mixer" [/usr/lib/oss/cuckoo/cuckoo_mixer.ko] undefined!
WARNING: "oss_strcpy" [/usr/lib/oss/cuckoo/cuckoo_mixer.ko] undefined!
WARNING: "mixer_devs_p" [/usr/lib/oss/cuckoo/cuckoo_mixer.ko] undefined!
WARNING: "oss_mixer_ext" [/usr/lib/oss/cuckoo/cuckoo_mixer.ko] undefined!
WARNING: "oss_strlen" [/usr/lib/oss/cuckoo/cuckoo_mixer.ko] undefined!
WARNING: "oss_memset" [/usr/lib/oss/cuckoo/cuckoo_mixer.ko] undefined!
WARNING: "num_mixers" [/usr/lib/oss/cuckoo/cuckoo_mixer.ko] undefined!
WARNING: "oss_get_cardinfo" [/usr/lib/oss/cuckoo/cuckoo.ko] undefined!
WARNING: "audio_engines" [/usr/lib/oss/cuckoo/cuckoo.ko] undefined!
WARNING: "oss_strncpy" [/usr/lib/oss/cuckoo/cuckoo.ko] undefined!
WARNING: "num_audio_engines" [/usr/lib/oss/cuckoo/cuckoo.ko] undefined!
  CC      /usr/lib/oss/cuckoo/cuckoo.mod.o
  LD [M]  /usr/lib/oss/cuckoo/cuckoo.ko
  CC      /usr/lib/oss/cuckoo/cuckoo_mixer.mod.o
  LD [M]  /usr/lib/oss/cuckoo/cuckoo_mixer.ko
  CC      /usr/lib/oss/cuckoo/cuckoo_pcm.mod.o
  LD [M]  /usr/lib/oss/cuckoo/cuckoo_pcm.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.12-11.dmz.1-liquorix-amd64'
cp *.ko /lib/modules/`uname -r`/kernel/oss
depmod -a

Code: Select all

$ sudo modprobe cuckoo
modprobe: ERROR: could not insert 'cuckoo': Unknown symbol in module, or unknown parameter (see dmesg)

Code: Select all

$ sudo tail /var/log/messages
Feb 19 18:16:17 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_new (err 0)
Feb 19 18:16:17 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_hw_constraint_minmax (err 0)
Feb 19 18:16:17 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_set_sync (err 0)
Feb 19 18:16:17 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_lib_ioctl (err 0)
Feb 19 18:16:17 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_set_ops (err 0)
Feb 19 18:16:17 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_period_elapsed (err 0)
Feb 19 18:20:26 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_new (err 0)
Feb 19 18:20:26 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_hw_constraint_minmax (err 0)
Feb 19 18:20:26 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_set_sync (err 0)
Feb 19 18:20:26 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_lib_ioctl (err 0)
Feb 19 18:20:26 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_set_ops (err 0)
Feb 19 18:20:26 ronin kernel: cuckoo_pcm: Unknown symbol snd_pcm_period_elapsed (err 0)


Since I am running kernel 3.12, would the patch need updated for that?

https://raw.github.com/l29ah/booboo/mas ... 3.12.patch

Re: cuckoo hacks/patches

Posted: Thu Feb 20, 2014 5:50 am
by ikk_pl
I had a similar issue when first trying to compile it. My first guess would be that you don't have ALSA in your kernel. Check if you have the 'sound' directory in /usr/modules/`uname -r`/kernel/, whether you compiled the kernel with ALSA, and whether the flag SND_PCM was actually set - this may require picking one of the drivers. Warnings about "undefined symbols" probably won't disappear, but otherwise shouldn't cause trouble.

No idea whether this patch could be useful (I'm a newbie to kernel stuff), I'll leave it to sb else.