Multiple sound cards / volume change

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple sound cards / volume change

Bob Newell
Aloha,

When I got an Asus laptop I ran into trouble with volume changes from
the keyboard. To make a long story short it seems emms-volume-amixer.el
assumes the card for Master volume is 0. But it turned out to be 1 on
this laptop. At least, the call-process to "amixer" doesn't include the
"-c" option which will default the card to 0.

I have fixed this with a rewrite of emms-volume-amixer.el, which I've
attached. I apologize that this is a quick and dirty solution, but I've
not seen this problem mentioned anywhere, and maybe it can get properly
fixed in a future release.

Mahalo,

--
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *


_______________________________________________
Emms-help mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/emms-help

emms-volume-amixer.el (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multiple sound cards / volume change

Yoni Rabkin-2


> Aloha,
>
> When I got an Asus laptop I ran into trouble with volume changes from
> the keyboard. To make a long story short it seems emms-volume-amixer.el
> assumes the card for Master volume is 0. But it turned out to be 1 on
> this laptop. At least, the call-process to "amixer" doesn't include the
> "-c" option which will default the card to 0.
>
> I have fixed this with a rewrite of emms-volume-amixer.el

I'm not sure why the rewrite. Why not add a configurable -c option to
the `call-process' in `emms-volume-amixer-change'?

--
   "Cut your own wood and it will warm you twice"

_______________________________________________
Emms-help mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/emms-help
Reply | Threaded
Open this post in threaded view
|

Re: Multiple sound cards / volume change

Bob Newell
Yoni Rabkin <[hidden email]> writes:

> I'm not sure why the rewrite. Why not add a configurable -c option to
> the `call-process' in `emms-volume-amixer-change'?

The issue for me was at least at first not knowing the number of the
Master card. So I added code to auto-detect this. A configurable -c
option would require, I think, advance knowledge of which card is
active, and would assume that the number never changes (hard to see why
it would without a hardware change, though).

Of course, a full rewrite isn't necessary, as you point out. I just
wanted to get it to work :)

--
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

_______________________________________________
Emms-help mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/emms-help
Reply | Threaded
Open this post in threaded view
|

Re: Multiple sound cards / volume change

Yoni Rabkin-2

> Yoni Rabkin <[hidden email]> writes:
>
>> I'm not sure why the rewrite. Why not add a configurable -c option to
>> the `call-process' in `emms-volume-amixer-change'?
>
> The issue for me was at least at first not knowing the number of the
> Master card. So I added code to auto-detect this. A configurable -c
> option would require, I think, advance knowledge of which card is
> active, and would assume that the number never changes (hard to see why
> it would without a hardware change, though).

This approach wouldn't cover multiple active cards; just the first
active card (not relevant in multi-card setups like mine for instance.)

> Of course, a full rewrite isn't necessary, as you point out. I just
> wanted to get it to work :)

Yes, the rewrite isn't needed.

We should, however, definitely add the choice-of-card option to the
customization options. Do you feel like writing that patch? No problem
if you don't, just say so and I'll do it.

In any case, thank you for bringing up this issue.

--
   "Cut your own wood and it will warm you twice"

_______________________________________________
Emms-help mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/emms-help
Reply | Threaded
Open this post in threaded view
|

Re: Multiple sound cards / volume change

Yoni Rabkin-2
Bob Newell <[hidden email]> writes:

> Yoni Rabkin <[hidden email]> writes:
>
>> We should, however, definitely add the choice-of-card option to the
>> customization options. Do you feel like writing that patch? No problem
>> if you don't, just say so and I'll do it.
>
> I would rather let you do it, not because I don't want to, but because
> my, um, "coding style" is not the best.
>
> You're right that in doing auto-detection I would only find the first
> active sound card. I am not sure how that could be handled, if indeed it
> should be handled. That said, I found auto-detection valuable because I
> would have had to guess until I got it right (though that wouldn't have
> taken long).
>
> However, since this issue hasn't been brought up before, over a span of at
> least 10 years, it likely doesn't affect a lot of users.
>
> Thank you for listening and for your attention to this issue.

I checked on my machine and I have cards with ids: 0, 1, and 29 (go
figure).

I've just pushed out to the git repo a patch which adds a customization
option so that the card id number can be chosen.


--
   "Cut your own wood and it will warm you twice"

_______________________________________________
Emms-help mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/emms-help