JiriSko / amixer-webui

Web application for control ALSA volume
MIT License
53 stars 21 forks source link

Support for alsaequal #3

Closed xt660x closed 7 years ago

xt660x commented 7 years ago

Hello JiriSko,

What about support for alsaequal in your nice webui? ;)

All the best

JiriSko commented 7 years ago

Hi xt660x,

thanks for tip. I'll see what I can do. :)

xt660x commented 7 years ago

Ok now :)

I managed to get it work with alsaequal by replacing "amixer" with "amixer -D equal" in 57 and 59 lines.

Original:

        if Handler.card is None:
            return ["amixer"]
        else:
            return ["amixer", "-c", "%d" % Handler.card]

New:

        if Handler.card is None:
            return ["amixer", "-D", "equal"]
        else:
            return ["amixer", "-D", "equal"]

And line 106:

Original: card_detail = Popen(["amixer", "-c", card_number, "info"], stdout=PIPE).communicate()[0]

New: card_detail = Popen(["amixer", "-D", "equal"], stdout=PIPE).communicate()[0]

Of course I had to install alsaequal first, in Ubuntu: sudo apt-get install libasound2-plugin-equal

JiriSko commented 7 years ago

Yep, that's simplest workaround. But I think that equalizer should have different UI than volume control (at least 90° rotated controls). So I wrote server backend and now I need to write frontend.

xt660x commented 7 years ago

Good :) Thanks for update :)

JiriSko commented 7 years ago

Can you please test it? :) Branch: dev-equalizer

xt660x commented 7 years ago

Yes, thanks, I will :)

xt660x commented 7 years ago

Hmm... I see no changes on the main screen... I mean no new controls for equalizer etc...: screenshot-alsa mixer webui on mikhail-mate - mozilla firefox

While I can see text output for eq controls on the /equalizer/ page:

screenshot-mozilla firefox

xt660x commented 7 years ago

And interesting. If I change

equal = True

in alsamixer-webui.py

... then restart alsamixer-webui.py

then reload the page in browser - I can see EQ controls. But after next page reload it comes back to standard mixer controls like Master Playback and others.

JiriSko commented 7 years ago

That's weird, you should see equalizer button like on the screenshot: screenshot Sorry for dumb question but do you really have latest code from dev-equalizer branch?

xt660x commented 7 years ago

Yep, I do :) Well, seems I do :) It also came to my mind :) So I tried it first by pulling it throgh git (git pull, git checkout dev-equalizer), second - by downloading zip directly from the webpage (https://github.com/JiriSko/amixer-webui/tree/dev-equalizer) and extracting it to separate folder etc. Same result :)

May it be possible that actually branch itself does not containg the latest code? Sorry for dumb question ;)

xt660x commented 7 years ago

Just in case:

$ python --version Python 2.7.3

JiriSko commented 7 years ago

Can you check Network card in Developer tools if /equalizer/ is loading? screenshot 2016-12-02 10 02 30

xt660x commented 7 years ago

Yep:

screenshot-alsa mixer webui on mikhail-mate - mozilla firefox-2

JiriSko commented 7 years ago

I found it :) This bug appears when you've got only one sound card. I'll fix it soon.

xt660x commented 7 years ago

Good! :)))

JiriSko commented 7 years ago

Fixed. Check it now please. :)

xt660x commented 7 years ago

Web-version works, thank! :) What about Android app? ;) I installed v 0.2.2 and there is no button for EQ :(

screenshot-alsa mixer webui on mikhail-mate - mozilla firefox-3

JiriSko commented 7 years ago

Good. Thanks for your help with debugging. I'll merge it into master and release. ;) And regarding android app, I didn't implement it yet.

xt660x commented 7 years ago

Thanks! :)

JiriSko commented 7 years ago

Equalizer support also added in android app v0.3.0. :)