Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RadioShark worked under Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
masayang
n00b
n00b


Joined: 09 Feb 2003
Posts: 7
Location: California

PostPosted: Mon Dec 05, 2005 3:10 am    Post subject: RadioShark worked under Gentoo Reply with quote

I bought a RadioShark then found this link which describes how to use it under linux.

It requires libhid but I couldn't find its ebuild, so I tried it without portage. Here is my mini-howto.

Requirements:
1) You need have access to usb. Make sure you are under usb group.
2) You need libusb.
Code:
# emerge libusb

3) You don't need HID support in the kernel.
4) You need subversion to get latest version of libhid sources.
5) You need ecasound.
Code:
# emerge ecasound


Get the source of libhid.
Code:

$ cd $HOME
$ svn co svn://svn.ailab.ch/libhid/trunk libhid-svn


Compile it.
Code:
$ cd libhid-svn
$ ./autogen.sh --enable-swig=no --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-debug=yes
$ make


You could install the library under /usr/lib, but you don't need it at this time. The libhid.so is under ~/libhid-svn/src/.libs

Get the source of shark.c.
I installed it under $HOME/shark
Compile it.
Code:

$ cd $HOME/shark
$ gcc -I ../libhid-svn/include/ -I ../libhid-svn/hidparser/ -L ../libhid-svn/src/.libs -lhid  shark.c -o shark


Now connect RadioShark to your USB port.
Code:

$ dmesg
...
usb 1-2: new full speed USB device using uhci_hcd and address 2
usbcore: registered new driver snd-usb-audio


Play it!
Code:

$ cd $HOME/shark
$ LD_LIBRARY_PATH=../libhid-svn/src/.libs/ ./shark -fm 106.1
$ ecasound -D -f:s16_le,2ch,6400,inter-leaved -i:/dev/dsp1 -o:/dev/dsp -B:nonrt -z:db -b:4096


The above example plays FM 106.1MHz, which is my favourite KMEL.

Did anybody have ebuild for libhid? 8)

masayang
_________________
masayang
Back to top
View user's profile Send private message
smros
n00b
n00b


Joined: 26 Feb 2006
Posts: 4

PostPosted: Sun Feb 26, 2006 7:13 pm    Post subject: Problem with LibHID Reply with quote

Hi, can get through the libhid stuff, but when I complile shark.c, i get an error:

shark.c:(.text+0x374): undefined reference to `hid_interrupt_write'

I have tried with multiple versions of libhid, straight from the libhid site as well as through subversion per your instructions. Did you see this error, and if so, how did you get around it?

Thanks in advance.
Back to top
View user's profile Send private message
cogburnd02
n00b
n00b


Joined: 14 Dec 2006
Posts: 1

PostPosted: Thu Dec 14, 2006 7:11 pm    Post subject: When compiling, I get an lhid error: "cannot find -lhid Reply with quote

Hi. Yes, I'm a stupid n00b. There, I said it.
I haven't actually ever compiled anything manually in Gentoo before, so this may be just some stupid error that only n00bs get, but I Google'd it and found minimal (at best) results. The problem seems to be with lhid.
Here's a transcript of what I tried in Konsole.

Tux shark # gcc -I ../libhid-svn/include/ -I ../libhid-svn/hidparser/ -L ../libhid-svn/src/.libs -lhid shark.c -o shark
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5-20050130/../../../../i386-pc-linux-gnu/bin/ld: cannot find -lhid
collect2: ld returned 1 exit status
Tux shark #


What seems to be the problem, doc?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum