Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PCM Mixer Einstellung sperren ?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Michbert
n00b
n00b


Joined: 16 May 2004
Posts: 18

PostPosted: Mon May 24, 2004 8:36 pm    Post subject: PCM Mixer Einstellung sperren ? Reply with quote

Da ständig irgendwelche Programme (wie wine) meine PCM Mixereinstellung auf 100 stellen zu müssen und sich der Sound dann mal wieder völlig kaput anhört, würde ich gern mal wissen ob ich die Einstellung irgendwie auf einem bestimmten Level einfrieren kann, so dass sie nichts und niemand mehr ändern kann, bis ich das wieder aufhebe, möglichst aber so, dass ich trotzdem noch stummschalten kann. Oder eben ne ander möglichkeit was dagegen zu tun...

Da sich scheinbar bei fast jedem der Sound verstümmelt wenn PCM Richtung 100 ist, könnt ich mir denken das die Frage so oder so ähnlich schon öfters kam, gefunden hab ich aber gerade eben nix in der Richtung... *unschuldigtu* ;)

Mal ganz dumm gefragt:
Warum verreckt der Sound überhaupt ab einer bestimmten einstellung? Was ist dieses PCM überhaupt?
Und warum is das standardmäßig so wenn so viele Probleme damit haben?
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Tue May 25, 2004 3:11 am    Post subject: Reply with quote

hmm..

ich kann dir nachher mal nen lockscript geben.. das tut einfach alle 5 sekunden die lautstärke wieder zurücksetzen .. etwas unschön aber wirkungsvoll ;)

ich poste das nachher, muss jetz erstma nach hause und schlafen ..

guten morgen ihr tagarbeiter ;)
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Tue May 25, 2004 2:43 pm    Post subject: Reply with quote

da ;)

Code:
#!/bin/bash
volm=`/usr/bin/amixer sget Master |/usr/bin/grep Right: |/usr/bin/cut -d' ' -f6`
volp=`/usr/bin/amixer sget PCM |/usr/bin/grep Right: |/usr/bin/cut -d' ' -f6`

if [ "$1" != "" ]; then
   volm=$1
   volp=$1
fi

echo "Locking volume, Master: $volm  PCM: $volp"

while true; do
   echo -n "."
   /usr/bin/amixer sset PCM unmute >/dev/null
   /usr/bin/amixer sset Master $volm >/dev/null
   /usr/bin/amixer sset PCM $volp >/dev/null
   sleep 5
done
Back to top
View user's profile Send private message
Michbert
n00b
n00b


Joined: 16 May 2004
Posts: 18

PostPosted: Tue May 25, 2004 10:24 pm    Post subject: Reply with quote

danke, immerhin etwas.
Aber kann man denn sonst wirklich nichts dagegen tun?
Back to top
View user's profile Send private message
etnoy
Apprentice
Apprentice


Joined: 29 Aug 2003
Posts: 255
Location: Västerås, Sweden

PostPosted: Wed May 26, 2004 8:40 am    Post subject: Reply with quote

Es geht gut mit die Programme alsactl. Versuch die volgendes Kommando:
Code:
alsactl store
alsactl restore


Ich glaube das alsactl in den Ebuild alsa-utils ist.
_________________
The md5sum of the above post is 06280ccd85ef9deb49c336e7945f4b5c

God is dead! - Nietzsche
Nietzsche is dead! -God
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Wed May 26, 2004 5:39 pm    Post subject: Reply with quote

Wenn du die Rechte für das Sounddevice (/dev/sound/mixer für oss und /dev/snd/pcirgendwas für alsa) auf 640 bzw 440 setzt sollte dein User nur mehr lesend darauf zugreifen können.
Dazu musst du wahrscheinlich ein bisschen in /etc/devfsd.conf und /etc/security/console.perms rumhacken. ;)
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
Michbert
n00b
n00b


Joined: 16 May 2004
Posts: 18

PostPosted: Thu May 27, 2004 10:02 am    Post subject: Reply with quote

Das hört sich doch schon besser an, wobei den kompletten mixer zu sperren is eigentlich auch nich das was ich im sinn hatte, werd das bei gelegenheit mal ausprobieren.
Mhm, hab Alsa - unter /dev/snd find ich
pcmC0D0c, pcmC0D0p, pcmC0D1c, pcmC0D2c, pcmC0D3p

so spontan würde ich mal davon ausgehen das nur die pcmC0D0 für mich interessant sind, nur was is c und was p - wobei ich eigentlich auch garkeine Ahnung hab.
In devfsd.conf hab ich
Code:
REGISTER        sound/.*     PERMISSIONS root.audio 660
REGISTER        snd/.*       PERMISSIONS root.audio 660

dürfte ja reichen wenn ich einfach noch ne zeile mit /dev/snd/<und dem mixer> anhänge?
wofür die console.perms genau zuständig is hab ich jetzt auf die schnell noch nicht ganz verstanden...

Vielleicht kann mir jemand nen Tipp geben, ansonsten werd ichs später eben mal ausprobieren...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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