Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ALSA] configuring the default playback and capture
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
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2663
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Sat Jan 14, 2017 12:18 am    Post subject: [ALSA] configuring the default playback and capture Reply with quote

In the past I had quite a lot of problems with pulseaudio, so I banned it from my system. The only program that doesn't like it is skype. Fortunatly apulse works great with skype.

I have a Logitec webcam with an integrated mic. Its better than any other microphone I have, so I like to use it as my default capture device. I don't know whether I can configure apulse or the dummy pulseaudio server to choose the mic from my webcam but the only solution that I've found so far, is to tell ALSA which is the default capture device:

Code:

# ~/.asoundrc

pcm.usb
{
    type hw
    card U0x46d0x81b
}

pcm.!default
{
    type asym
    playback.pcm
    {   
        type plug
        slave.pcm "dmix"
    }   
    capture.pcm
    {   
        type plug
        slave.pcm "usb"
    }   
}



This work great. I only have one issue though: when I watch something with mplayer and I press m to mute the sound, mplayer prints "Mute: enabled" but I still can hear the audio. If I remove the .asoundrc file and restart mplayer and then press m to mute the sound, then it works. Why is that? Is there a better way to configure apulse so that it uses the mic from the webcam without having to change the .asoundrc file?
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Chiitoo
Moderator
Moderator


Joined: 28 Feb 2010
Posts: 1294
Location: Here and Away Again

PostPosted: Sun Jan 29, 2017 8:55 am    Post subject: ><)))°€ Reply with quote

Moved from Portage & Programming to Multimedia, as it might fit better here (though configuring ALSA certainly can be viewed as a kind of programming...).


As for the issue, I /think/ I've seen that before, but I forget all of the details.

In any case, I'm thinking 'mplayer' is controlling a different device, than what it is using for playback. I think you should see which device it's muting by having 'alsamixer' open while you hit the mute key.

As a sidey-note, using 'mpv' I can mute /just/ 'mpv', without the whole device (this might be possible with 'mplayer' as well, but I forget).

To make 'mplayer' mute the correct device, you might need to add a control section into your '.asoundrc' in addition to the playback/capture devices (I didn't test this, so I could be off completely).
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
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