Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been using moc for a while on a laptop and it is great, but then I wanted to plug in USB radio as an output, rhythmbox and other players detected new output device, but moc has output hardcoded in ~/.moc/config, where is stated:

# Sound driver - OSS, ALSA, JACK, SNDIO (on OpenBSD) or null (only for
# debugging).
# You can enter more than one driver as a colon-separated list.  The first
# working driver will be used.
SoundDriver             = JACK:ALSA:OSS

# Jack output settings.
JackOutLeft             = "alsa_pcm:playback_1"
JackOutRight            = "alsa_pcm:playback_2"

# OSS output device.
OSSDevice               = /dev/dsp

# OSS Mixer device.
OSSMixerDevice          = /dev/mixer

# OSS Mixer channel: pcm or master.
OSSMixerChannel         = pcm

# Second OSS Mixer channel: pcm or master.
OSSMixerChannel2        = master

# ALSA mixer device.
AlsaMixer               = PCM

# Second ALSA mixer device.
AlsaMixer2              = Master

# ALSA output device.
AlsaDevice              = default

And I have no idea, what to change. Some tutorial on devices and some additional help is needed.

I suppose, I have to change something in alsa, but neither in moc nor in alsamixer, I do not know how to check, where is my usb device and what to change.

share|improve this question

1 Answer 1

I assume you are not using Jack audio server, but common Alsa:

Problem should probably be this line, which tells MOC to use default Alsa device (which is probably the internal sound card):

AlsaDevice              = default

Solution #1: Change your Alsa default device every time you insert your USB audio stuff. That is nicely mentioned at Alsa FAQ page: http://alsa.opensrc.org/FAQ026 This can perhaps be scripted using udev (but that's another question I guess)

Solution #2: Create second config file for MOC with different setting of AlsaDevice variable and everytime you run MOC, setup which config to use with --config $FILE. But I am not sure how to set properly AlsaDevice setting in MOC

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.