Skip to contentSkip to conversation

ice1724 - Changing Level Meters from MIXER to PCM?

PATCH Pavel Hofman 3 participants 4 messages Oct 6, 2009 Sound

lore
Share & tools
lore
#0 lore raw

Hi,

Following your discussion on moving low-level controls from MIXER to PCM types, I would like to suggest the following two patches:

sound/pci/ice1712/ice1724.c +0 -0
index 3896fb9..28ca8a4 100644
@@ -2160,7 +2160,7 @@ static int snd_vt1724_pro_peak_get(struct

snd_kcontrol *kcontrol,
}

static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = {
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = "Multi Track Peak",
.access = SNDRV_CTL_ELEM_ACCESS_READ |
SNDRV_CTL_ELEM_ACCESS_VOLATILE,

        .info = snd_vt1724_pro_peak_info,
envy24control/levelmeters.c +0 -0
index 3bf1a94..9bdaace 100644
@@ -262,7 +262,7 @@ void level_meters_reset_peaks(GtkButton *button,

gpointer da
void level_meters_init(void)

 {
        snd_ctl_elem_value_malloc(&peaks);
-       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_MIXER);
+       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_PCM);
        snd_ctl_elem_value_set_name(peaks, "Multi Track Peak");

}

The point is these controls are read-only, display incorrectly in alsamixer, and are very confusing for majority of users who do not read envy24 datasheet and the source code.

Thanks for considering this IMO useful change.

Regards,

Pavel.

#1 lore raw
Quoted 39 lines · Pavel Hofman

Hi,

Following your discussion on moving low-level controls from MIXER to PCM types, I would like to suggest the following two patches:

sound/pci/ice1712/ice1724.c +1 -1
index 3896fb9..28ca8a4 100644
@@ -2160,7 +2160,7 @@ static int snd_vt1724_pro_peak_get(struct
 snd_kcontrol *kcontrol,
 }
 
 static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = {
-       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface = SNDRV_CTL_ELEM_IFACE_PCM,
        .name = "Multi Track Peak",
        .access = SNDRV_CTL_ELEM_ACCESS_READ |

SNDRV_CTL_ELEM_ACCESS_VOLATILE,

        .info = snd_vt1724_pro_peak_info,
envy24control/levelmeters.c +0 -0
index 3bf1a94..9bdaace 100644
@@ -262,7 +262,7 @@ void level_meters_reset_peaks(GtkButton *button,

gpointer da
void level_meters_init(void)

 {
        snd_ctl_elem_value_malloc(&peaks);
envy24control/levelmeters.c +1 -1
-       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_MIXER);
+       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_PCM);
        snd_ctl_elem_value_set_name(peaks, "Multi Track Peak");
 }
Quoted 8 lines

The point is these controls are read-only, display incorrectly in alsamixer, and are very confusing for majority of users who do not read envy24 datasheet and the source code.

Thanks for considering this IMO useful change.

Regards,

Sorry for a mistake - envy24control is used for ice1712 only, i.e. the change should happen in ice1712.c too. No further implications for change in ice1724.c.

Should you approve the change, I will send proper patch emails.

Thanks,

Pavel

#2 lore raw

At Tue, 06 Oct 2009 10:28:01 +0200,

Quoted 47 lines · Pavel Hofman
Quoted 45 lines · Pavel Hofman

Hi,

Following your discussion on moving low-level controls from MIXER to PCM types, I would like to suggest the following two patches:

sound/pci/ice1712/ice1724.c +1 -1
index 3896fb9..28ca8a4 100644
@@ -2160,7 +2160,7 @@ static int snd_vt1724_pro_peak_get(struct
 snd_kcontrol *kcontrol,
 }
 
 static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = {
-       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface = SNDRV_CTL_ELEM_IFACE_PCM,
        .name = "Multi Track Peak",
        .access = SNDRV_CTL_ELEM_ACCESS_READ |

SNDRV_CTL_ELEM_ACCESS_VOLATILE,

        .info = snd_vt1724_pro_peak_info,
envy24control/levelmeters.c +0 -0
index 3bf1a94..9bdaace 100644
@@ -262,7 +262,7 @@ void level_meters_reset_peaks(GtkButton *button,

gpointer da
void level_meters_init(void)

 {
        snd_ctl_elem_value_malloc(&peaks);
envy24control/levelmeters.c +1 -1
-       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_MIXER);
+       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_PCM);
        snd_ctl_elem_value_set_name(peaks, "Multi Track Peak");
 }

The point is these controls are read-only, display incorrectly in alsamixer, and are very confusing for majority of users who do not read envy24 datasheet and the source code.

Thanks for considering this IMO useful change.

Quoted 7 lines
Quoted 2 lines

Regards,

Sorry for a mistake - envy24control is used for ice1712 only, i.e. the change should happen in ice1712.c too. No further implications for change in ice1724.c.

Yep, I just wanted to follow up, but killed it now :)

Quoted 1 line

Should you approve the change, I will send proper patch emails.

It looks good to me. There is no app (AFAIK) that handles the vu meter properly for ice1724 as now, so there is no worry about regression.

thanks,

Takashi

maintainer Acked-by
#3 lore raw
In reply to Pavel Hofman
Quoted 54 lines · Pavel Hofman
Quoted 39 lines · Pavel Hofman

Hi,

Following your discussion on moving low-level controls from MIXER to PCM types, I would like to suggest the following two patches:

sound/pci/ice1712/ice1724.c +1 -1
index 3896fb9..28ca8a4 100644
@@ -2160,7 +2160,7 @@ static int snd_vt1724_pro_peak_get(struct
 snd_kcontrol *kcontrol,
 }
 
 static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = {
-       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface = SNDRV_CTL_ELEM_IFACE_PCM,
        .name = "Multi Track Peak",
        .access = SNDRV_CTL_ELEM_ACCESS_READ |

SNDRV_CTL_ELEM_ACCESS_VOLATILE,

        .info = snd_vt1724_pro_peak_info,
envy24control/levelmeters.c +0 -0
index 3bf1a94..9bdaace 100644
@@ -262,7 +262,7 @@ void level_meters_reset_peaks(GtkButton *button,

gpointer da
void level_meters_init(void)

 {
        snd_ctl_elem_value_malloc(&peaks);
envy24control/levelmeters.c +1 -1
-       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_MIXER);
+       snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_PCM);
        snd_ctl_elem_value_set_name(peaks, "Multi Track Peak");
 }
Quoted 8 lines

The point is these controls are read-only, display incorrectly in alsamixer, and are very confusing for majority of users who do not read envy24 datasheet and the source code.

Thanks for considering this IMO useful change.

Regards,

Sorry for a mistake - envy24control is used for ice1712 only, i.e. the change should happen in ice1712.c too. No further implications for change in ice1724.c.

Quoted 1 line

Should you approve the change, I will send proper patch emails.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.