* [PATCH 1/1] Echoaudio: fix broken Mia driver
@ 2009-09-29 20:21 Giuliano Pochini
2009-09-29 21:39 ` Giuliano Pochini
0 siblings, 1 reply; 4+ messages in thread
From: Giuliano Pochini @ 2009-09-29 20:21 UTC (permalink / raw)
To: Alsa-devel
This change:
http://git.alsa-project.org/?p=alsa-kernel.git;a=blobdiff;f=sound/pci/echoaudio/echoaudio.c;h=4b70ea1e4c9fa3dc903dec8cf69235c97c2173ad;hp=8dbc5c4ba421a03dd128050dbd271616efdee3ae;hb=9f5d790d1b0af8e3705df12fd5d49a1df2a45c47;hpb=041b62374c7fedc11a8a1eeda2868612d3d1436c
broke the Mia driver because it removed the line-out control interface from
all vmixer cards. But the Mia has that (undocumented!!) control and after
the change it is impossible to raise the volume. I tested the driver with
my IndigoIOx that was supposed to have the same set of controls... sorry.
I hope it's not too late to merge this patch in linux-2.6.32.
----------
Re-enable the line-out control for the Mia card.
Signed-off-by: Giuliano Pochini <pochini@shiny.it>
diff -u alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/echoaudio.c alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/echoaudio.c
--- alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/echoaudio.c 2009-08-28 13:41:39.000000000 +0200
+++ alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/echoaudio.c 2009-09-29 21:55:48.000000000 +0200
@@ -950,7 +950,7 @@
Control interface
******************************************************************************/
-#ifndef ECHOCARD_HAS_VMIXER
+#if !defined(ECHOCARD_HAS_VMIXER) || defined(ECHOCARD_HAS_LINE_OUT_GAIN)
/******************* PCM output volume *******************/
static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol,
@@ -1003,6 +1003,19 @@
return changed;
}
+#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
+/* On the Mia this one controls the line-out volume */
+static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = {
+ .name = "Line Playback Volume",
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
+ SNDRV_CTL_ELEM_ACCESS_TLV_READ,
+ .info = snd_echo_output_gain_info,
+ .get = snd_echo_output_gain_get,
+ .put = snd_echo_output_gain_put,
+ .tlv = {.p = db_scale_output_gain},
+};
+#else
static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
.name = "PCM Playback Volume",
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1012,9 +1025,10 @@
.put = snd_echo_output_gain_put,
.tlv = {.p = db_scale_output_gain},
};
-
#endif
+#endif /* !ECHOCARD_HAS_VMIXER || ECHOCARD_HAS_LINE_OUT_GAIN */
+
#ifdef ECHOCARD_HAS_INPUT_GAIN
@@ -2030,10 +2044,14 @@
snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip);
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0)
goto ctl_error;
-#else
- if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_pcm_output_gain, chip))) < 0)
+#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
+ if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_output_gain, chip))) < 0)
goto ctl_error;
#endif
+#else /* ECHOCARD_HAS_VMIXER */
+ if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_pcm_output_gain, chip))) < 0)
+ goto ctl_error;
+#endif /* ECHOCARD_HAS_VMIXER */
#ifdef ECHOCARD_HAS_INPUT_GAIN
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0)
diff -u alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/mia.c alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/mia.c
--- alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/mia.c 2009-08-28 13:41:39.000000000 +0200
+++ alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/mia.c 2009-09-29 21:55:48.000000000 +0200
@@ -29,6 +29,7 @@
#define ECHOCARD_HAS_ADAT FALSE
#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32
#define ECHOCARD_HAS_MIDI
+#define ECHOCARD_HAS_LINE_OUT_GAIN
/* Pipe indexes */
#define PX_ANALOG_OUT 0 /* 8 */
--
Giuliano.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] Echoaudio: fix broken Mia driver
2009-09-29 20:21 [PATCH 1/1] Echoaudio: fix broken Mia driver Giuliano Pochini
@ 2009-09-29 21:39 ` Giuliano Pochini
2009-09-30 6:29 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Giuliano Pochini @ 2009-09-29 21:39 UTC (permalink / raw)
To: Alsa-devel
On Tue, 29 Sep 2009 22:21:28 +0200
Giuliano Pochini <pochini@shiny.it> wrote:
Same patch with style changes to make checkpatch.pl happy.
----------
Re-enable the line-out control for the Mia card.
Signed-off-by: Giuliano Pochini <pochini@shiny.it>
diff -u alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/echoaudio.c alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/echoaudio.c
--- alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/echoaudio.c 2009-08-28 13:41:39.000000000 +0200
+++ alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/echoaudio.c 2009-09-29 23:00:56.000000000 +0200
@@ -950,7 +950,7 @@
Control interface
******************************************************************************/
-#ifndef ECHOCARD_HAS_VMIXER
+#if !defined(ECHOCARD_HAS_VMIXER) || defined(ECHOCARD_HAS_LINE_OUT_GAIN)
/******************* PCM output volume *******************/
static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol,
@@ -1003,6 +1003,19 @@
return changed;
}
+#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
+/* On the Mia this one controls the line-out volume */
+static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = {
+ .name = "Line Playback Volume",
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
+ SNDRV_CTL_ELEM_ACCESS_TLV_READ,
+ .info = snd_echo_output_gain_info,
+ .get = snd_echo_output_gain_get,
+ .put = snd_echo_output_gain_put,
+ .tlv = {.p = db_scale_output_gain},
+};
+#else
static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
.name = "PCM Playback Volume",
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1012,9 +1025,10 @@
.put = snd_echo_output_gain_put,
.tlv = {.p = db_scale_output_gain},
};
-
#endif
+#endif /* !ECHOCARD_HAS_VMIXER || ECHOCARD_HAS_LINE_OUT_GAIN */
+
#ifdef ECHOCARD_HAS_INPUT_GAIN
@@ -2030,10 +2044,18 @@
snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip);
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0)
goto ctl_error;
-#else
- if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_pcm_output_gain, chip))) < 0)
+#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
+ err = snd_ctl_add(chip->card,
+ snd_ctl_new1(&snd_echo_line_output_gain, chip));
+ if (err < 0)
goto ctl_error;
#endif
+#else /* ECHOCARD_HAS_VMIXER */
+ err = snd_ctl_add(chip->card,
+ snd_ctl_new1(&snd_echo_pcm_output_gain, chip));
+ if (err < 0)
+ goto ctl_error;
+#endif /* ECHOCARD_HAS_VMIXER */
#ifdef ECHOCARD_HAS_INPUT_GAIN
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0)
diff -u alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/mia.c alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/mia.c
--- alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/mia.c 2009-08-28 13:41:39.000000000 +0200
+++ alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/mia.c 2009-09-29 22:19:31.000000000 +0200
@@ -29,6 +29,7 @@
#define ECHOCARD_HAS_ADAT FALSE
#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32
#define ECHOCARD_HAS_MIDI
+#define ECHOCARD_HAS_LINE_OUT_GAIN
/* Pipe indexes */
#define PX_ANALOG_OUT 0 /* 8 */
--
Giuliano.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] Echoaudio: fix broken Mia driver
2009-09-29 21:39 ` Giuliano Pochini
@ 2009-09-30 6:29 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2009-09-30 6:29 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: Alsa-devel
At Tue, 29 Sep 2009 23:39:17 +0200,
Giuliano Pochini wrote:
>
> On Tue, 29 Sep 2009 22:21:28 +0200
> Giuliano Pochini <pochini@shiny.it> wrote:
>
> Same patch with style changes to make checkpatch.pl happy.
>
> ----------
>
> Re-enable the line-out control for the Mia card.
>
> Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Thanks, applied now.
Takashi
>
> diff -u alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/echoaudio.c alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/echoaudio.c
> --- alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/echoaudio.c 2009-08-28 13:41:39.000000000 +0200
> +++ alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/echoaudio.c 2009-09-29 23:00:56.000000000 +0200
> @@ -950,7 +950,7 @@
> Control interface
> ******************************************************************************/
>
> -#ifndef ECHOCARD_HAS_VMIXER
> +#if !defined(ECHOCARD_HAS_VMIXER) || defined(ECHOCARD_HAS_LINE_OUT_GAIN)
>
> /******************* PCM output volume *******************/
> static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol,
> @@ -1003,6 +1003,19 @@
> return changed;
> }
>
> +#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
> +/* On the Mia this one controls the line-out volume */
> +static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = {
> + .name = "Line Playback Volume",
> + .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
> + .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
> + SNDRV_CTL_ELEM_ACCESS_TLV_READ,
> + .info = snd_echo_output_gain_info,
> + .get = snd_echo_output_gain_get,
> + .put = snd_echo_output_gain_put,
> + .tlv = {.p = db_scale_output_gain},
> +};
> +#else
> static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
> .name = "PCM Playback Volume",
> .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
> @@ -1012,9 +1025,10 @@
> .put = snd_echo_output_gain_put,
> .tlv = {.p = db_scale_output_gain},
> };
> -
> #endif
>
> +#endif /* !ECHOCARD_HAS_VMIXER || ECHOCARD_HAS_LINE_OUT_GAIN */
> +
>
>
> #ifdef ECHOCARD_HAS_INPUT_GAIN
> @@ -2030,10 +2044,18 @@
> snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip);
> if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0)
> goto ctl_error;
> -#else
> - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_pcm_output_gain, chip))) < 0)
> +#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
> + err = snd_ctl_add(chip->card,
> + snd_ctl_new1(&snd_echo_line_output_gain, chip));
> + if (err < 0)
> goto ctl_error;
> #endif
> +#else /* ECHOCARD_HAS_VMIXER */
> + err = snd_ctl_add(chip->card,
> + snd_ctl_new1(&snd_echo_pcm_output_gain, chip));
> + if (err < 0)
> + goto ctl_error;
> +#endif /* ECHOCARD_HAS_VMIXER */
>
> #ifdef ECHOCARD_HAS_INPUT_GAIN
> if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0)
> diff -u alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/mia.c alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/mia.c
> --- alsa-driver-1.0.21/alsa-kernel/pci/echoaudio__orig/mia.c 2009-08-28 13:41:39.000000000 +0200
> +++ alsa-driver-1.0.21/alsa-kernel/pci/echoaudio/mia.c 2009-09-29 22:19:31.000000000 +0200
> @@ -29,6 +29,7 @@
> #define ECHOCARD_HAS_ADAT FALSE
> #define ECHOCARD_HAS_STEREO_BIG_ENDIAN32
> #define ECHOCARD_HAS_MIDI
> +#define ECHOCARD_HAS_LINE_OUT_GAIN
>
> /* Pipe indexes */
> #define PX_ANALOG_OUT 0 /* 8 */
>
>
>
> --
> Giuliano.
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20091011184533.GA3328@xeron.cc>]
end of thread, other threads:[~2009-10-13 22:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-29 20:21 [PATCH 1/1] Echoaudio: fix broken Mia driver Giuliano Pochini
2009-09-29 21:39 ` Giuliano Pochini
2009-09-30 6:29 ` Takashi Iwai
[not found] <20091011184533.GA3328@xeron.cc>
2009-10-13 22:26 ` Giuliano Pochini
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.