* [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
@ 2004-08-27 12:51 James Courtier-Dutton
2004-08-27 16:30 ` Takashi Iwai
0 siblings, 1 reply; 10+ messages in thread
From: James Courtier-Dutton @ 2004-08-27 12:51 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
I attach a diff file against ./alsa-utils/alsamixer/alsamixer.c
It causes alsamixer to display 2 different views of the mixer controls.
One view shows only the "Playback" controls, the other view shows only
the "Capture" controls, with a hidden mode (Press F1, then Enter) to
show the old method of all controls together.
Cheers
James
[-- Attachment #2: alsamixer-separate-play-capture.txt --]
[-- Type: text/plain, Size: 9361 bytes --]
--- alsamixer.c.org 2004-08-13 12:01:34.000000000 +0100
+++ alsamixer.c 2004-08-27 13:44:29.132321190 +0100
@@ -167,6 +167,8 @@
/* --- views --- */
enum {
VIEW_CHANNELS,
+ VIEW_PLAYBACK,
+ VIEW_CAPTURE,
VIEW_HELP,
VIEW_PROCINFO
};
@@ -177,7 +179,7 @@
static int mixer_needs_resize = 0;
static int mixer_minimize = 0;
static int mixer_no_lrcorner = 0;
-static int mixer_view = VIEW_CHANNELS;
+static int mixer_view = VIEW_PLAYBACK;
static int mixer_max_x = 0;
static int mixer_max_y = 0;
static int mixer_ofs_x = 0;
@@ -227,6 +229,7 @@
/* split scontrols */
static int mixer_n_elems = 0;
+static int mixer_n_view_elems = 0;
static int mixer_n_vis_elems = 0;
static int mixer_first_vis_elem = 0;
static int mixer_focus_elem = 0;
@@ -254,6 +257,8 @@
" Esc exit alsamixer\n"
" F1 show Help screen\n"
" F2 show /proc info screen\n"
+ " F3 show Playback controls only\n"
+ " F4 show Capture controls only\n"
" Return return to main screen\n"
" Space toggle Capture facility\n"
" Tab toggle ExactMode\n"
@@ -545,7 +550,7 @@
if (mixer_sid == NULL)
return;
-
+
sid = (snd_mixer_selem_id_t *)(((char *)mixer_sid) + snd_mixer_selem_id_sizeof() * mixer_grpidx[elem_index]);
elem = snd_mixer_find_selem(mixer_handle, sid);
if (elem == NULL)
@@ -758,7 +763,7 @@
vright = vleft;
}
}
-
+
if (type == MIXER_ELEM_CAPTURE && snd_mixer_selem_has_capture_volume(elem)) {
long vmin, vmax;
snd_mixer_selem_get_capture_volume_range(elem, &vmin, &vmax);
@@ -779,7 +784,21 @@
if (xlen > 63)
xlen = 63;
mixer_dc (DC_PROMPT);
- mvaddstr (3, 2, "Item: ");
+ mvaddstr (3, 2, "View: ");
+ mixer_dc (DC_TEXT);
+ switch (mixer_view) {
+ case VIEW_PLAYBACK:
+ mvaddstr (3, 8, "Playback");
+ break;
+ case VIEW_CAPTURE:
+ mvaddstr (3, 8, "Capture");
+ break;
+ default:
+ mvaddstr (3, 8, "All");
+ break;
+ }
+ mixer_dc (DC_PROMPT);
+ mvaddstr (4, 2, "Item: ");
mixer_dc (DC_TEXT);
string1[8] = 0;
for (i = 0; i < 63; i++)
@@ -952,7 +971,6 @@
static int o_y = 0;
int i, x, y;
-
if (!mixer_cbar_get_pos (mixer_focus_elem, &x, &y))
{
if (mixer_focus_elem < mixer_first_vis_elem)
@@ -961,15 +979,15 @@
mixer_first_vis_elem = mixer_focus_elem - mixer_n_vis_elems + 1;
mixer_cbar_get_pos (mixer_focus_elem, &x, &y);
}
- if (mixer_first_vis_elem + mixer_n_vis_elems >= mixer_n_elems) {
- mixer_first_vis_elem = mixer_n_elems - mixer_n_vis_elems;
+ if (mixer_first_vis_elem + mixer_n_vis_elems >= mixer_n_view_elems) {
+ mixer_first_vis_elem = mixer_n_view_elems - mixer_n_vis_elems;
if (mixer_first_vis_elem < 0)
mixer_first_vis_elem = 0;
mixer_cbar_get_pos (mixer_focus_elem, &x, &y);
}
mixer_write_cbar(mixer_focus_elem);
for (i = 0; i < mixer_n_vis_elems; i++) {
- if (i + mixer_first_vis_elem >= mixer_n_elems)
+ if (i + mixer_first_vis_elem >= mixer_n_view_elems)
continue;
mixer_update_cbar (i + mixer_first_vis_elem);
}
@@ -1521,53 +1539,57 @@
elem = snd_mixer_find_selem(mixer_handle, sid);
if (elem == NULL)
CHECK_ABORT (ERR_FCN, "snd_mixer_find_selem()", -EINVAL);
- for (i = 0; i < MIXER_ELEM_CAPTURE; i++) {
- int ok;
- for (j = ok = 0; j < 2; j++) {
- if (mixer_changed_state)
- goto __again;
- if (snd_mixer_selem_has_playback_channel(elem, mixer_elem_chn[i][j]))
- ok++;
+ if ( (mixer_view == VIEW_PLAYBACK) || (mixer_view == VIEW_CHANNELS) ) {
+ for (i = 0; i < MIXER_ELEM_CAPTURE; i++) {
+ int ok;
+ for (j = ok = 0; j < 2; j++) {
+ if (mixer_changed_state)
+ goto __again;
+ if (snd_mixer_selem_has_playback_channel(elem, mixer_elem_chn[i][j]))
+ ok++;
+ }
+ if (ok) {
+ sid = (snd_mixer_selem_id_t *)(((char *)mixer_sid) + snd_mixer_selem_id_sizeof() * idx);
+ mixer_grpidx[elem_index] = idx;
+ if (snd_mixer_selem_is_enumerated(elem)) {
+ mixer_type[elem_index] = MIXER_ELEM_ENUM;
+ } else {
+ mixer_type[elem_index] = i;
+ if (i == 0 && snd_mixer_selem_has_playback_switch(elem))
+ mixer_type[elem_index] |= MIXER_ELEM_MUTE_SWITCH;
+ if (snd_mixer_selem_has_playback_volume(elem))
+ mixer_type[elem_index] |= MIXER_ELEM_HAS_VOLUME;
+ }
+ elem_index++;
+ nelems_added++;
+ if (elem_index >= mixer_n_elems)
+ break;
+ }
}
- if (ok) {
- sid = (snd_mixer_selem_id_t *)(((char *)mixer_sid) + snd_mixer_selem_id_sizeof() * idx);
- mixer_grpidx[elem_index] = idx;
- if (snd_mixer_selem_is_enumerated(elem)) {
- mixer_type[elem_index] = MIXER_ELEM_ENUM;
- } else {
- mixer_type[elem_index] = i;
- if (i == 0 && snd_mixer_selem_has_playback_switch(elem))
- mixer_type[elem_index] |= MIXER_ELEM_MUTE_SWITCH;
- if (snd_mixer_selem_has_playback_volume(elem))
- mixer_type[elem_index] |= MIXER_ELEM_HAS_VOLUME;
- if (i == 0 && snd_mixer_selem_has_capture_switch(elem))
- mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SWITCH;
- }
- elem_index++;
- nelems_added++;
- if (elem_index >= mixer_n_elems)
+ }
+
+ if ( (mixer_view == VIEW_CAPTURE) || (mixer_view == VIEW_CHANNELS) ) {
+ if (snd_mixer_selem_has_capture_volume(elem) ||
+ (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))) {
+ mixer_grpidx[elem_index] = idx;
+ mixer_type[elem_index] = MIXER_ELEM_CAPTURE;
+ if (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))
+ mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SWITCH;
+ if (nelems_added)
+ mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SUFFIX;
+ if (snd_mixer_selem_has_capture_volume(elem))
+ mixer_type[elem_index] |= MIXER_ELEM_HAS_VOLUME;
+ elem_index++;
+ if (elem_index >= mixer_n_elems)
break;
}
}
- if (snd_mixer_selem_has_capture_volume(elem) ||
- (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))) {
- mixer_grpidx[elem_index] = idx;
- mixer_type[elem_index] = MIXER_ELEM_CAPTURE;
- if (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))
- mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SWITCH;
- if (nelems_added)
- mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SUFFIX;
- if (snd_mixer_selem_has_capture_volume(elem))
- mixer_type[elem_index] |= MIXER_ELEM_HAS_VOLUME;
- elem_index++;
- if (elem_index >= mixer_n_elems)
- break;
- }
}
+ mixer_n_view_elems = elem_index;
mixer_focus_elem = 0;
if (focus_type >= 0) {
- for (elem_index = 0; elem_index < mixer_n_elems; elem_index++) {
+ for (elem_index = 0; elem_index < mixer_n_view_elems; elem_index++) {
sid = (snd_mixer_selem_id_t *)(((char *)mixer_sid) + snd_mixer_selem_id_sizeof() * mixer_grpidx[elem_index]);
if (!strcmp(snd_mixer_selem_id_get_name(focus_gid),
snd_mixer_selem_id_get_name(sid)) &&
@@ -1619,7 +1641,7 @@
/* required allocations */
mixer_n_vis_elems = (mixer_max_x - mixer_ofs_x * 2 + 1) / 9;
- mixer_n_vis_elems = CLAMP (mixer_n_vis_elems, 1, mixer_n_elems);
+ mixer_n_vis_elems = CLAMP (mixer_n_vis_elems, 1, mixer_n_view_elems);
mixer_extra_space = mixer_max_x - mixer_ofs_x * 2 + 1 - mixer_n_vis_elems * 9;
mixer_extra_space = MAX (0, mixer_extra_space / (mixer_n_vis_elems + 1));
if (MIXER_TEXT_Y + 10 < mixer_max_y)
@@ -1769,9 +1791,13 @@
break;
case 13: /* Return */
case 10: /* NewLine */
- if (mixer_view == VIEW_CHANNELS)
+ if (mixer_view == VIEW_CHANNELS) {
mixer_clear (FALSE);
- mixer_view = VIEW_CHANNELS;
+ } else {
+ mixer_view = VIEW_CHANNELS;
+ mixer_changed_state=1;
+ mixer_reinit ();
+ }
key = 0;
break;
case 'h':
@@ -1785,6 +1811,26 @@
mixer_view = VIEW_PROCINFO;
key = 0;
break;
+ case KEY_F (3):
+ if (mixer_view == VIEW_PLAYBACK) {
+ mixer_clear (FALSE);
+ } else {
+ mixer_view = VIEW_PLAYBACK;
+ mixer_changed_state=1;
+ mixer_reinit ();
+ }
+ key = 0;
+ break;
+ case KEY_F (4):
+ if (mixer_view == VIEW_CAPTURE) {
+ mixer_clear (FALSE);
+ } else {
+ mixer_view = VIEW_CAPTURE;
+ mixer_changed_state=1;
+ mixer_reinit ();
+ }
+ key = 0;
+ break;
case '\014':
case 'L':
case 'l':
@@ -1855,7 +1901,10 @@
break;
}
- if (key && mixer_view == VIEW_CHANNELS)
+ if (key &&
+ ((mixer_view == VIEW_CHANNELS) ||
+ (mixer_view == VIEW_PLAYBACK) ||
+ (mixer_view == VIEW_CAPTURE)) )
switch (key)
{
case KEY_RIGHT:
@@ -1955,7 +2004,7 @@
if (old_view != mixer_view)
mixer_clear (FALSE);
- mixer_focus_elem = CLAMP (mixer_focus_elem, 0, mixer_n_elems - 1);
+ mixer_focus_elem = CLAMP (mixer_focus_elem, 0, mixer_n_view_elems - 1);
return finished;
}
@@ -2027,7 +2076,7 @@
mixer_init ();
mixer_reinit ();
- if (mixer_n_elems == 0) {
+ if (mixer_n_view_elems == 0) {
fprintf(stderr, "No mixer elems found\n");
mixer_abort (ERR_NONE, "", 0);
}
@@ -2060,6 +2109,8 @@
switch (mixer_view)
{
case VIEW_CHANNELS:
+ case VIEW_PLAYBACK:
+ case VIEW_CAPTURE:
mixer_update_cbars ();
break;
case VIEW_HELP:
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 12:51 [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls James Courtier-Dutton
@ 2004-08-27 16:30 ` Takashi Iwai
2004-08-27 16:42 ` James Courtier-Dutton
0 siblings, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2004-08-27 16:30 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
At Fri, 27 Aug 2004 13:51:26 +0100,
James Courtier-Dutton wrote:
>
> I attach a diff file against ./alsa-utils/alsamixer/alsamixer.c
>
> It causes alsamixer to display 2 different views of the mixer controls.
> One view shows only the "Playback" controls, the other view shows only
> the "Capture" controls, with a hidden mode (Press F1, then Enter) to
> show the old method of all controls together.
Nice work, applied to cvs.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 16:30 ` Takashi Iwai
@ 2004-08-27 16:42 ` James Courtier-Dutton
2004-08-27 16:52 ` Takashi Iwai
0 siblings, 1 reply; 10+ messages in thread
From: James Courtier-Dutton @ 2004-08-27 16:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Takashi Iwai wrote:
> At Fri, 27 Aug 2004 13:51:26 +0100,
> James Courtier-Dutton wrote:
>
>>I attach a diff file against ./alsa-utils/alsamixer/alsamixer.c
>>
>>It causes alsamixer to display 2 different views of the mixer controls.
>>One view shows only the "Playback" controls, the other view shows only
>>the "Capture" controls, with a hidden mode (Press F1, then Enter) to
>>show the old method of all controls together.
>
>
> Nice work, applied to cvs.
>
>
> Takashi
>
I have a question. The "Mic Boost" seems to think it is a "Playback"
control. What would be the best way to getting that to be a "Capture"
control. Would simply editing it in ac97_codec.c be enough?
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 16:42 ` James Courtier-Dutton
@ 2004-08-27 16:52 ` Takashi Iwai
2004-08-27 17:34 ` James Courtier-Dutton
2004-08-28 7:17 ` Jaroslav Kysela
0 siblings, 2 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-08-27 16:52 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
At Fri, 27 Aug 2004 17:42:41 +0100,
James Courtier-Dutton wrote:
>
> Takashi Iwai wrote:
> > At Fri, 27 Aug 2004 13:51:26 +0100,
> > James Courtier-Dutton wrote:
> >
> >>I attach a diff file against ./alsa-utils/alsamixer/alsamixer.c
> >>
> >>It causes alsamixer to display 2 different views of the mixer controls.
> >>One view shows only the "Playback" controls, the other view shows only
> >>the "Capture" controls, with a hidden mode (Press F1, then Enter) to
> >>show the old method of all controls together.
> >
> >
> > Nice work, applied to cvs.
> >
> >
> > Takashi
> >
>
> I have a question. The "Mic Boost" seems to think it is a "Playback"
> control. What would be the best way to getting that to be a "Capture"
> control. Would simply editing it in ac97_codec.c be enough?
Hmm, when you change the control name itself, it breaks slightly
compatibility with older version.
I don't mind it, but maybe it would be wiser to change alsa-lib
simple.c to handle 'Mic Boost' as capture?
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 16:52 ` Takashi Iwai
@ 2004-08-27 17:34 ` James Courtier-Dutton
2004-08-27 17:48 ` Takashi Iwai
2004-08-28 7:17 ` Jaroslav Kysela
1 sibling, 1 reply; 10+ messages in thread
From: James Courtier-Dutton @ 2004-08-27 17:34 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Takashi Iwai wrote:
>>
>>I have a question. The "Mic Boost" seems to think it is a "Playback"
>>control. What would be the best way to getting that to be a "Capture"
>>control. Would simply editing it in ac97_codec.c be enough?
>
>
> Hmm, when you change the control name itself, it breaks slightly
> compatibility with older version.
What does the name have to be compatible with?
I.e. What program might break if we change this in ac97_codec.c ?
>
> I don't mind it, but maybe it would be wiser to change alsa-lib
> simple.c to handle 'Mic Boost' as capture?
>
>
> Takashi
>
>
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 17:34 ` James Courtier-Dutton
@ 2004-08-27 17:48 ` Takashi Iwai
2004-08-27 18:37 ` Lee Revell
2004-08-27 21:16 ` James Courtier-Dutton
0 siblings, 2 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-08-27 17:48 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
At Fri, 27 Aug 2004 18:34:21 +0100,
James Courtier-Dutton wrote:
>
> Takashi Iwai wrote:
> >>
> >>I have a question. The "Mic Boost" seems to think it is a "Playback"
> >>control. What would be the best way to getting that to be a "Capture"
> >>control. Would simply editing it in ac97_codec.c be enough?
> >
> >
> > Hmm, when you change the control name itself, it breaks slightly
> > compatibility with older version.
>
> What does the name have to be compatible with?
> I.e. What program might break if we change this in ac97_codec.c ?
Dunno. But, at least, when you run "alsactl restore", the status
won't be restored.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 17:48 ` Takashi Iwai
@ 2004-08-27 18:37 ` Lee Revell
2004-08-30 9:28 ` Takashi Iwai
2004-08-27 21:16 ` James Courtier-Dutton
1 sibling, 1 reply; 10+ messages in thread
From: Lee Revell @ 2004-08-27 18:37 UTC (permalink / raw)
To: Takashi Iwai; +Cc: James Courtier-Dutton, alsa-devel
On Fri, 2004-08-27 at 13:48, Takashi Iwai wrote:
> At Fri, 27 Aug 2004 18:34:21 +0100,
> James Courtier-Dutton wrote:
> >
> > Takashi Iwai wrote:
> > >>
> > >>I have a question. The "Mic Boost" seems to think it is a "Playback"
> > >>control. What would be the best way to getting that to be a "Capture"
> > >>control. Would simply editing it in ac97_codec.c be enough?
> > >
> > >
> > > Hmm, when you change the control name itself, it breaks slightly
> > > compatibility with older version.
> >
> > What does the name have to be compatible with?
> > I.e. What program might break if we change this in ac97_codec.c ?
>
> Dunno. But, at least, when you run "alsactl restore", the status
> won't be restored.
>
Is it possible to have alsactl restore ignore controls that it does not
understand, leaving them set to the default value, rather than the
entire alsactl restore failing if it encounters an error? I have been
bitten by this a few times when upgrading ALSA.
Lee
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 18:37 ` Lee Revell
@ 2004-08-30 9:28 ` Takashi Iwai
0 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-08-30 9:28 UTC (permalink / raw)
To: Lee Revell; +Cc: James Courtier-Dutton, alsa-devel
At Fri, 27 Aug 2004 14:37:14 -0400,
Lee Revell wrote:
>
> On Fri, 2004-08-27 at 13:48, Takashi Iwai wrote:
> > At Fri, 27 Aug 2004 18:34:21 +0100,
> > James Courtier-Dutton wrote:
> > >
> > > Takashi Iwai wrote:
> > > >>
> > > >>I have a question. The "Mic Boost" seems to think it is a "Playback"
> > > >>control. What would be the best way to getting that to be a "Capture"
> > > >>control. Would simply editing it in ac97_codec.c be enough?
> > > >
> > > >
> > > > Hmm, when you change the control name itself, it breaks slightly
> > > > compatibility with older version.
> > >
> > > What does the name have to be compatible with?
> > > I.e. What program might break if we change this in ac97_codec.c ?
> >
> > Dunno. But, at least, when you run "alsactl restore", the status
> > won't be restored.
> >
>
> Is it possible to have alsactl restore ignore controls that it does not
> understand, leaving them set to the default value, rather than the
> entire alsactl restore failing if it encounters an error? I have been
> bitten by this a few times when upgrading ALSA.
-F option does it although it still print warnings.
alsasound init script already uses this option.
However, using a default value means the lost of information, of
course :)
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 17:48 ` Takashi Iwai
2004-08-27 18:37 ` Lee Revell
@ 2004-08-27 21:16 ` James Courtier-Dutton
1 sibling, 0 replies; 10+ messages in thread
From: James Courtier-Dutton @ 2004-08-27 21:16 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
Takashi Iwai wrote:
> At Fri, 27 Aug 2004 18:34:21 +0100,
> James Courtier-Dutton wrote:
>
>>Takashi Iwai wrote:
>>
>>>>I have a question. The "Mic Boost" seems to think it is a "Playback"
>>>>control. What would be the best way to getting that to be a "Capture"
>>>>control. Would simply editing it in ac97_codec.c be enough?
>>>
>>>
>>>Hmm, when you change the control name itself, it breaks slightly
>>>compatibility with older version.
>>
>>What does the name have to be compatible with?
>>I.e. What program might break if we change this in ac97_codec.c ?
>
>
> Dunno. But, at least, when you run "alsactl restore", the status
> won't be restored.
>
>
> Takashi
>
>
Thats true, but from a purely conceptual point of view, I think the Mic
Boost should be associated with Capture and not associated with Playback.
I attach a patch to do just that.
James
[-- Attachment #2: mic-boost.diff.txt --]
[-- Type: text/plain, Size: 785 bytes --]
Index: alsa-driver/alsa-kernel/pci/ac97/ac97_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v
retrieving revision 1.144
diff -u -r1.144 ac97_codec.c
--- alsa-driver/alsa-kernel/pci/ac97/ac97_codec.c 11 Aug 2004 18:51:58 -0000 1.144
+++ alsa-driver/alsa-kernel/pci/ac97/ac97_codec.c 27 Aug 2004 21:10:44 -0000
@@ -687,7 +687,7 @@
static const snd_kcontrol_new_t snd_ac97_controls_mic[3] = {
AC97_SINGLE("Mic Playback Switch", AC97_MIC, 15, 1, 1),
AC97_SINGLE("Mic Playback Volume", AC97_MIC, 0, 15, 1),
-AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0)
+AC97_SINGLE("Mic Boost (+20dB) Capture Switch", AC97_MIC, 6, 1, 0)
};
static const snd_kcontrol_new_t snd_ac97_control_capture_src = {
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls.
2004-08-27 16:52 ` Takashi Iwai
2004-08-27 17:34 ` James Courtier-Dutton
@ 2004-08-28 7:17 ` Jaroslav Kysela
1 sibling, 0 replies; 10+ messages in thread
From: Jaroslav Kysela @ 2004-08-28 7:17 UTC (permalink / raw)
To: Takashi Iwai; +Cc: James Courtier-Dutton, alsa-devel
On Fri, 27 Aug 2004, Takashi Iwai wrote:
> I don't mind it, but maybe it would be wiser to change alsa-lib
> simple.c to handle 'Mic Boost' as capture?
Mic Boost is for both directions, isn't?
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-08-30 9:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-27 12:51 [PATCH] Change alsamixer to show different views. Playback controls, or Capture controls James Courtier-Dutton
2004-08-27 16:30 ` Takashi Iwai
2004-08-27 16:42 ` James Courtier-Dutton
2004-08-27 16:52 ` Takashi Iwai
2004-08-27 17:34 ` James Courtier-Dutton
2004-08-27 17:48 ` Takashi Iwai
2004-08-27 18:37 ` Lee Revell
2004-08-30 9:28 ` Takashi Iwai
2004-08-27 21:16 ` James Courtier-Dutton
2004-08-28 7:17 ` Jaroslav Kysela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.