Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how do I push audio to a usb device? [SOLVED]
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
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Fri Apr 20, 2007 2:50 am    Post subject: how do I push audio to a usb device? [SOLVED] Reply with quote

I'm hoping this is an easy one.

I've got a MiniDisc USB optical device connected:
Code:
bean linux # lsusb
Bus 002 Device 006: ID 09ef:0101 Xitel MD-Port DG2 MiniDisc Interface
how do I push audio to it so I can record to MD?

Last edited by mobymac on Fri May 25, 2007 2:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Fri Apr 20, 2007 4:18 am    Post subject: Reply with quote

Ok, so I found a couple other threads, most notably this one: https://forums.gentoo.org/viewtopic-t-53966.html

But my question remains pretty much the same-- how do I now push audio to my second sound card (I've got usb-audio set up as the second card on the system)?
Code:
bean ~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: CK804 [NVidia CK804], device 0: Intel ICH [NVidia CK804]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CK804 [NVidia CK804], device 2: Intel ICH - IEC958 [NVidia CK804 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: DG2 [MD-PORT DG2], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Back to top
View user's profile Send private message
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Sun Apr 22, 2007 3:34 am    Post subject: Reply with quote

I can specify usb-audio with alsamixergui, but I need to figure out how to push audio from a specific program to usb. Or even if I could straight mirror it.

Please help?
Back to top
View user's profile Send private message
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Mon May 14, 2007 1:43 am    Post subject: Reply with quote

is there a way to specify on the command line to play a particular file or source directly to usb-audio?
Back to top
View user's profile Send private message
soren.harward
n00b
n00b


Joined: 23 Jun 2003
Posts: 11

PostPosted: Mon May 14, 2007 6:35 pm    Post subject: Reply with quote

Does the USB audio device show up as a sound card in ALSA? You should be able to run
Code:
aplay -l

and see the audio device listed ("aplay" is in the "alsa-utils" package). I'm going to assume that the usb_audio device is shows up as "Card 1". Then you can just run
Code:
aplay -d hw:1 [filename]

to pipe audio into the sound card. Your audio player program should also be able to switch devices if you want to play music using a program other than aplay.[/code]
Back to top
View user's profile Send private message
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Mon May 14, 2007 10:15 pm    Post subject: Reply with quote

quite right, you sexy beast.
Code:
scott@bean ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: CK804 [NVidia CK804], device 0: Intel ICH [NVidia CK804]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: CK804 [NVidia CK804], device 2: Intel ICH - IEC958 [NVidia CK804 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: DG2 [MD-PORT DG2], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
unfortunately, pushing audio to it seems to conflict with my actual sound card-- I get a loud static sound mixed over the music I'm listening to. If I stop the music it's the same thing. I checked the man page for aplay and it turns out that "-d" is actually interrupt duration and that "-D" is the device name specifier switch, but that yields
Code:
scott@bean ~ $ aplay -D hw:1 media/audio/music/Weezer/Weezer\ -\ The\ Good\ Life.mp3
Playing raw data 'media/audio/music/Weezer/Weezer - The Good Life.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:900: Sample format non available
so I checked device names to be sure
Code:
scott@bean ~ $ aplay -L
default:CARD=CK804
    NVidia CK804, NVidia CK804
    Default Audio Device
front:CARD=CK804,DEV=0
    NVidia CK804, NVidia CK804
    Front speakers
surround40:CARD=CK804,DEV=0
    NVidia CK804, NVidia CK804
    4.0 Surround output to Front and Rear speakers
surround41:CARD=CK804,DEV=0
    NVidia CK804, NVidia CK804
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CK804,DEV=0
    NVidia CK804, NVidia CK804
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CK804,DEV=0
    NVidia CK804, NVidia CK804
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
null
    Discard all samples (playback) or generate zero samples (capture)
and I don't even see the usb-audio pcm device in there. Do I need to create it?

thanks for your help, my man
Back to top
View user's profile Send private message
dreadhead
Guru
Guru


Joined: 09 Jul 2004
Posts: 470
Location: Ulm - Germany

PostPosted: Wed May 16, 2007 11:36 am    Post subject: Reply with quote

hmmm.... have you tried alsaconf?
_________________
Kopete OTR Plugin
Back to top
View user's profile Send private message
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Wed May 23, 2007 4:05 am    Post subject: Reply with quote

I have now. The problem isn't detecting the device, it's pushing audio to it...
Back to top
View user's profile Send private message
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Fri May 25, 2007 4:38 am    Post subject: Reply with quote

why do I get loud static when using
Code:
aplay -d hw:1 [filename]
as suggested?

anybody know how to push sound to a USB audio device separately from my regular sound system (ie listen to music while simultaneously pushing an audiobook to minidisc)?
Back to top
View user's profile Send private message
dreadhead
Guru
Guru


Joined: 09 Jul 2004
Posts: 470
Location: Ulm - Germany

PostPosted: Fri May 25, 2007 5:36 am    Post subject: Reply with quote

mplayer -ao alsa:hw1.0 somesoundfile.mp3

Not 100% sure about the syntax. Could be -ao alsa:hw=1.0 or something like this. Depends on which program you use. Basically every program that has an alsa use-flag can be called in this way to play on your second sound device. See the man-pages...
You could also try using xmms. change the output plugin to alsa and select your USB device.

BTW: Isn't there any way to copy your audiobook digitally to minidisc? Mounting the disc etc. (I never used a minidisc...)
_________________
Kopete OTR Plugin
Back to top
View user's profile Send private message
mobymac
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 169
Location: the red corner

PostPosted: Fri May 25, 2007 2:36 pm    Post subject: Reply with quote

dude you're my freaking hero. Thank you thank you. Checked the man page, the syntax was actually like so:
Code:
mplayer -ao alsa:device=hw=1.0 PartyBen-GalvanizetheEmpire.mp3
but that worked like a charm. At least now I know I can do it-- now it's a matter of making Amarok and other stuff push to it.

As to your question, yes, there is a way to do it, but not with my model. I bought into a crappy, dying technology and now I have to live with it. Oh well.

Unless someone knows of a place to get a decent MD drive for my computer...?
Back to top
View user's profile Send private message
dreadhead
Guru
Guru


Joined: 09 Jul 2004
Posts: 470
Location: Ulm - Germany

PostPosted: Fri May 25, 2007 2:53 pm    Post subject: Reply with quote

To enable amarok with this device go to the settings dialog and select Audio-Output. Select xine as Output-Module. Write "hw:1.0" into the field "Stereo:". Probably you also have to write it into "Mono:" if youre listing to audio books.

To switch with ease between MD-Player and Speakers just switch between mplayer and xine as output module.

You will be pleased with KDE4. There is a new audio backend called phonon whitch allows dynamic switching between soundcards.
_________________
Kopete OTR Plugin
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