Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Detecting audio CD insertion?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
pkd
n00b
n00b


Joined: 17 Mar 2004
Posts: 53

PostPosted: Wed Jun 23, 2004 11:04 pm    Post subject: Detecting audio CD insertion? Reply with quote

I'm trying to write a script/daemon that will run when an audio CD is inserted. It would rip the audio with cdparanoia, tag and name the files according to CDDB data, then encode and store them. That's all pretty straightforward. The hard part is getting it to trigger when the CD is inserted. Stuff like submount or supermount doesn't work because audio CDs can't be mounted.

I've searched around a bit, but I haven't a clue where to start. Any ideas? Has this already been done? Or am I going to have to do my own kernel hacking?
Back to top
View user's profile Send private message
playfool
l33t
l33t


Joined: 01 Jun 2004
Posts: 688
Location: Århus, Denmark

PostPosted: Wed Jun 23, 2004 11:54 pm    Post subject: Reply with quote

Nobody told you about HAL?
Back to top
View user's profile Send private message
Roguelazer
Veteran
Veteran


Joined: 10 Feb 2003
Posts: 1233
Location: San Francisco, CA

PostPosted: Thu Jun 24, 2004 1:11 am    Post subject: Reply with quote

Yeah man, hal is what you're looking for. You should check out gnome-volume-manager, it's a cool little screen. The ebuilds can be gotten from breakmygentoo.net. To get both them and the hal/d-bus ebuilds, use the overlay rsync instructions here.
_________________
Registered Linux User #263260
Back to top
View user's profile Send private message
pkd
n00b
n00b


Joined: 17 Mar 2004
Posts: 53

PostPosted: Thu Jun 24, 2004 2:56 am    Post subject: Reply with quote

Thanks, Roguelazer. It's hard to keep up with all the details of people working on Linux and its thousands of related projects when my job forces me to be very familiar with the Windows API and kernel. It's a lot to take in and remember ;) So I usually only play with the stable stuff that's in the official Gentoo portage, unless I have a reason not to.

I should have mentioned that this is a box without a display (or direct input for that matter), so no X, GTK, or Gnome. That's why detecting insertion is so critical.
Back to top
View user's profile Send private message
Roguelazer
Veteran
Veteran


Joined: 10 Feb 2003
Posts: 1233
Location: San Francisco, CA

PostPosted: Thu Jun 24, 2004 2:57 am    Post subject: Reply with quote

hal and dbus don't require gnome or any of that. But gnome-volume-manager is a convienient interface to them, that's all.
_________________
Registered Linux User #263260
Back to top
View user's profile Send private message
wdreinhart
Guru
Guru


Joined: 11 Jun 2003
Posts: 569
Location: 4QFJ12345678

PostPosted: Thu Jun 24, 2004 3:02 am    Post subject: Reply with quote

You should look into ivman. It does the same things as gnome-volume-manager, but doesn't depend on gnome, gtk, X11, or any of that stuff.
Back to top
View user's profile Send private message
eikketk
Apprentice
Apprentice


Joined: 03 Jun 2003
Posts: 270
Location: Belgium

PostPosted: Thu Jun 24, 2004 6:30 am    Post subject: Reply with quote

You don't even need a script for this ;)
Get ivman and set "abcde whatever" as "cdplay_cmd".

In ivman_ng it'll be possible to do this loads niftier (like, not starting to rip but playback when the cd has already been ripped and stuff like that). But that's very work-in-progress. More info in the wiki and on the mailing list.
_________________
Working day and night to enhance the Linux Desktop Experience :)

Homepage
Back to top
View user's profile Send private message
pkd
n00b
n00b


Joined: 17 Mar 2004
Posts: 53

PostPosted: Fri Jun 25, 2004 1:13 am    Post subject: Reply with quote

eikketk wrote:
You don't even need a script for this ;)
Get ivman and set "abcde whatever" as "cdplay_cmd".

In ivman_ng it'll be possible to do this loads niftier (like, not starting to rip but playback when the cd has already been ripped and stuff like that). But that's very work-in-progress. More info in the wiki and on the mailing list.


*sigh* Finally. After hours of trying to figure out what's going wrong with libhal, I run across a thread that mentions you need to be using udev for any of this to work at all...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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