* [PATCH] hda: Add dmux to STAC 9228
@ 2007-10-18 21:36 Matthew Ranostay
2007-10-19 5:31 ` Takashi Iwai
2007-10-19 16:45 ` Tim Gardner
0 siblings, 2 replies; 6+ messages in thread
From: Matthew Ranostay @ 2007-10-18 21:36 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai, Tellman, Steven
[-- Attachment #1: Type: text/plain, Size: 191 bytes --]
Added a dmux to the STAC9228 cards with DMIC support. And added a
STAC_DIGITAL_INPUT_SOURCE macro for repeating mixer code.
---
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
[-- Attachment #2: stac9228_dmux.patch --]
[-- Type: text/plain, Size: 1512 bytes --]
diff -r 821a4558dd47 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c Thu Oct 18 17:38:17 2007 +0200
+++ b/pci/hda/patch_sigmatel.c Thu Oct 18 17:35:56 2007 -0400
@@ -430,6 +430,16 @@ static struct hda_verb stac9205_core_ini
{}
};
+#define STAC_DIGITAL_INPUT_SOURCE(cnt) \
+ { \
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+ .name = "Digital Input Source", \
+ .count = cnt, \
+ .info = stac92xx_dmux_enum_info, \
+ .get = stac92xx_dmux_enum_get, \
+ .put = stac92xx_dmux_enum_put,\
+ }
+
#define STAC_INPUT_SOURCE(cnt) \
{ \
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
@@ -482,14 +492,7 @@ static struct snd_kcontrol_new stac925x_
};
static struct snd_kcontrol_new stac9205_mixer[] = {
- {
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- .name = "Digital Input Source",
- .count = 1,
- .info = stac92xx_dmux_enum_info,
- .get = stac92xx_dmux_enum_get,
- .put = stac92xx_dmux_enum_put,
- },
+ STAC_DIGITAL_INPUT_SOURCE(1),
STAC_INPUT_SOURCE(2),
STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0),
STAC_VOLKNOB(0x24),
@@ -521,6 +524,7 @@ static struct snd_kcontrol_new stac922x_
static struct snd_kcontrol_new stac927x_mixer[] = {
+ STAC_DIGITAL_INPUT_SOURCE(1),
STAC_INPUT_SOURCE(3),
STAC_VOLKNOB(0x24),
STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB),
@@ -2773,6 +2777,7 @@ static int patch_stac927x(struct hda_cod
case 0x10280209: /* STAC 9228 */
spec->dmic_nids = stac927x_dmic_nids;
spec->num_dmics = STAC927X_NUM_DMICS;
+ spec->dmux_nid = 0x1c;
break;
default:
spec->num_dmics = 0;
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda: Add dmux to STAC 9228
2007-10-18 21:36 [PATCH] hda: Add dmux to STAC 9228 Matthew Ranostay
@ 2007-10-19 5:31 ` Takashi Iwai
2007-10-19 16:45 ` Tim Gardner
1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2007-10-19 5:31 UTC (permalink / raw)
To: Matthew Ranostay; +Cc: alsa-devel, Tellman, Steven
At Thu, 18 Oct 2007 17:36:32 -0400,
Matthew Ranostay wrote:
>
> Added a dmux to the STAC9228 cards with DMIC support. And added a
> STAC_DIGITAL_INPUT_SOURCE macro for repeating mixer code.
> ---
> Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Thanks, applied to HG tree now.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda: Add dmux to STAC 9228
2007-10-18 21:36 [PATCH] hda: Add dmux to STAC 9228 Matthew Ranostay
2007-10-19 5:31 ` Takashi Iwai
@ 2007-10-19 16:45 ` Tim Gardner
2007-10-19 17:59 ` Matthew Ranostay
1 sibling, 1 reply; 6+ messages in thread
From: Tim Gardner @ 2007-10-19 16:45 UTC (permalink / raw)
To: Matthew Ranostay; +Cc: Takashi Iwai, alsa-devel, Tellman, Steven
Matthew Ranostay wrote:
> Added a dmux to the STAC9228 cards with DMIC support. And added a
> STAC_DIGITAL_INPUT_SOURCE macro for repeating mixer code.
> ---
I'm not having any luck with this patch on my XPS M1330. I built against
Ubuntu Gutsy (2.6.22 which requires some PIT_TICK_RATE futzing in
pcsp.h) from current ALSA repo bits after Takashi applied it to HG. I
also removed Gusty l-u-m which contains a conflicting snd-hda-intel.
Audio output works fine. The only record source that appears to work is
the external microphone (front input), though it is very faint even with
mux 1 cranked to the max.
Can you describe your environment and record applications? Perhaps I'm
just missing some assumption.
--
Tim Gardner tim.gardner@ubuntu.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda: Add dmux to STAC 9228
2007-10-19 16:45 ` Tim Gardner
@ 2007-10-19 17:59 ` Matthew Ranostay
2007-10-19 18:45 ` Tim Gardner
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Ranostay @ 2007-10-19 17:59 UTC (permalink / raw)
To: Tim Gardner; +Cc: Takashi Iwai, alsa-devel, Tellman, Steven
[-- Attachment #1: Type: text/plain, Size: 946 bytes --]
Tim Gardner wrote:
> Matthew Ranostay wrote:
>
>> Added a dmux to the STAC9228 cards with DMIC support. And added a
>> STAC_DIGITAL_INPUT_SOURCE macro for repeating mixer code.
>> ---
>>
>
> I'm not having any luck with this patch on my XPS M1330. I built against
> Ubuntu Gutsy (2.6.22 which requires some PIT_TICK_RATE futzing in
> pcsp.h) from current ALSA repo bits after Takashi applied it to HG. I
> also removed Gusty l-u-m which contains a conflicting snd-hda-intel.
>
> Audio output works fine. The only record source that appears to work is
> the external microphone (front input), though it is very faint even with
> mux 1 cranked to the max.
>
> Can you describe your environment and record applications? Perhaps I'm
> just missing some assumption.
>
>
I think the problem is that I set the dmux to ADC1MUX instead of
ADC0MUX, could you test this patch to confirm?
Please let me know your results.
Thanks,
Matt Ranostay
[-- Attachment #2: stac9228_dmux_correction.patch --]
[-- Type: text/plain, Size: 448 bytes --]
diff -r 7cf5e23f804e pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c Fri Oct 19 08:23:00 2007 +0200
+++ b/pci/hda/patch_sigmatel.c Fri Oct 19 13:47:35 2007 -0400
@@ -2777,7 +2777,7 @@ static int patch_stac927x(struct hda_cod
case 0x10280209: /* STAC 9228 */
spec->dmic_nids = stac927x_dmic_nids;
spec->num_dmics = STAC927X_NUM_DMICS;
- spec->dmux_nid = 0x1c;
+ spec->dmux_nid = 0x1b;
break;
default:
spec->num_dmics = 0;
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda: Add dmux to STAC 9228
2007-10-19 17:59 ` Matthew Ranostay
@ 2007-10-19 18:45 ` Tim Gardner
2007-10-19 18:59 ` Matthew Ranostay
0 siblings, 1 reply; 6+ messages in thread
From: Tim Gardner @ 2007-10-19 18:45 UTC (permalink / raw)
To: Matthew Ranostay; +Cc: Takashi Iwai, alsa-devel, Tellman, Steven
This doesn't seem to make a lot of difference. The external microphone
is marginally better, but still not really usable (recognizable but
distorted). The Gnome ALSA mixer shows 3 capture sources plus digital
and 3 mux's. Only the first capture source records anything. I verified
that you must have an external mic plugged in just to make sure the
built-in mic wasn't recording.
rtg
Matthew Ranostay wrote:
> I think the problem is that I set the dmux to ADC1MUX instead of
> ADC0MUX, could you test this patch to confirm?
> Please let me know your results.
>
> Thanks,
>
> Matt Ranostay
>
>
> ------------------------------------------------------------------------
>
> diff -r 7cf5e23f804e pci/hda/patch_sigmatel.c
> --- a/pci/hda/patch_sigmatel.c Fri Oct 19 08:23:00 2007 +0200
> +++ b/pci/hda/patch_sigmatel.c Fri Oct 19 13:47:35 2007 -0400
> @@ -2777,7 +2777,7 @@ static int patch_stac927x(struct hda_cod
> case 0x10280209: /* STAC 9228 */
> spec->dmic_nids = stac927x_dmic_nids;
> spec->num_dmics = STAC927X_NUM_DMICS;
> - spec->dmux_nid = 0x1c;
> + spec->dmux_nid = 0x1b;
> break;
> default:
> spec->num_dmics = 0;
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
Tim Gardner tim.gardner@ubuntu.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda: Add dmux to STAC 9228
2007-10-19 18:45 ` Tim Gardner
@ 2007-10-19 18:59 ` Matthew Ranostay
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Ranostay @ 2007-10-19 18:59 UTC (permalink / raw)
To: Tim Gardner; +Cc: Takashi Iwai, alsa-devel, Tellman, Steven
Tim Gardner wrote:
> This doesn't seem to make a lot of difference. The external microphone
> is marginally better, but still not really usable (recognizable but
> distorted). The Gnome ALSA mixer shows 3 capture sources plus digital
> and 3 mux's. Only the first capture source records anything. I verified
> that you must have an external mic plugged in just to make sure the
> built-in mic wasn't recording.
>
> rtg
>
> Matthew Ranostay wrote:
>
>> I think the problem is that I set the dmux to ADC1MUX instead of
>> ADC0MUX, could you test this patch to confirm?
>> Please let me know your results.
>>
>> Thanks,
>>
>> Matt Ranostay
>>
>>
>> ------------------------------------------------------------------------
>>
>> diff -r 7cf5e23f804e pci/hda/patch_sigmatel.c
>> --- a/pci/hda/patch_sigmatel.c Fri Oct 19 08:23:00 2007 +0200
>> +++ b/pci/hda/patch_sigmatel.c Fri Oct 19 13:47:35 2007 -0400
>> @@ -2777,7 +2777,7 @@ static int patch_stac927x(struct hda_cod
>> case 0x10280209: /* STAC 9228 */
>> spec->dmic_nids = stac927x_dmic_nids;
>> spec->num_dmics = STAC927X_NUM_DMICS;
>> - spec->dmux_nid = 0x1c;
>> + spec->dmux_nid = 0x1b;
>> break;
>> default:
>> spec->num_dmics = 0;
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>
>
>
>
Ok it is true that there are 3 mux capture sources, but as of the moment
we are only using one of them,
ADC0MUX(which will be the first capture source control).
The reason that you can barely hear any sound recording from a DMIC is
that there is no hardware db gain, the
only way you can currently get measurable results is from software gain.
Hope that answers your questions.
Thanks,
Matt Ranostay
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-19 18:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 21:36 [PATCH] hda: Add dmux to STAC 9228 Matthew Ranostay
2007-10-19 5:31 ` Takashi Iwai
2007-10-19 16:45 ` Tim Gardner
2007-10-19 17:59 ` Matthew Ranostay
2007-10-19 18:45 ` Tim Gardner
2007-10-19 18:59 ` Matthew Ranostay
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.