From: Christoph Fritz <chf.fritz@googlemail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, "Hans J. Koch" <hjk@hansjkoch.de>,
Sascha Hauer <s.hauer@pengutronix.de>, Liam Girdwood <lrg@ti.com>
Subject: Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
Date: Thu, 26 Apr 2012 15:49:02 +0200 [thread overview]
Message-ID: <1335448142.20000.40.camel@mars> (raw)
In-Reply-To: <20120426112726.GF3207@opensource.wolfsonmicro.com>
On Thu, 2012-04-26 at 12:27 +0100, Mark Brown wrote:
> On Wed, Apr 25, 2012 at 10:07:49PM +0200, Christoph Fritz wrote:
>
> > # amixer sset "Mic Select Source" 'Mic 2'
> > Simple mixer control 'Mic Select Source',0
> > Capabilities: enum
> > Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
> > Item0: 'Mic 1'
>
> Nothing springing to mind here, can you see logging for the register
> writes?
I added some printks into ac97_write() "sound/soc/codecs/wm9712.c" and
when I do for example change "Item: Mic Boost [dB gain: 20.00] " I get
this:
write eh 8000 [6808]
write eh 8000 [6888]
but when I try to change "Mic Select Source" or "Item: Differential
Source", nothing happens here.
And in "sound/soc/codecs/wm9712.c":
static const struct soc_enum wm9712_enum[] = {
SOC_ENUM_SINGLE(AC97_PCI_SVID, 14, 4, wm9712_alc_select),
SOC_ENUM_SINGLE(AC97_VIDEO, 12, 4, wm9712_alc_mux),
SOC_ENUM_SINGLE(AC97_AUX, 9, 4, wm9712_out3_src),
SOC_ENUM_SINGLE(AC97_AUX, 8, 2, wm9712_spk_src),
SOC_ENUM_SINGLE(AC97_REC_SEL, 12, 4, wm9712_rec_adc),
SOC_ENUM_SINGLE(AC97_MASTER_TONE, 15, 2, wm9712_base),
SOC_ENUM_DOUBLE(AC97_REC_GAIN, 14, 6, 2, wm9712_rec_gain),
SOC_ENUM_SINGLE(AC97_MIC, 5, 4, wm9712_mic),
SOC_ENUM_SINGLE(AC97_REC_SEL, 8, 8, wm9712_rec_sel),
SOC_ENUM_SINGLE(AC97_REC_SEL, 0, 8, wm9712_rec_sel),
SOC_ENUM_SINGLE(AC97_PCI_SVID, 5, 2, wm9712_ng_type),
SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel),
};
Why is wm9712_enum[0] never used?
Is "SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel)," correct? Because of
the ">> 1" shift in ac97_write() ?
Thanks,
-- Christoph
>
> > When I tested arecord for line-in, the "Capture Slide" in alsamixer
was
> > wrongly inverted.
> > in sound/soc/codecs/wm9712.c:
> > SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
> > should get:
> > SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
> > If you want I can send a patch in.
>
> Yes, please. In general this is always a good thing to do if you spot
> an error in the code.
>
> > Since patch "ASoC: Sync initial widget state with hardware"
> > (commitid: b66a70d5e9929f3b0df5a7177bba75652d2f4c3e) the mic capture
doesn't
> > work. The MICBIAS bit from the "Power Management" Register are alway
1 (disabled).
> > So that the captering works the active status must be set to 1, at
the right time.
> > That this works the stream name must be set.
>
> This analysis seems a bit confused - how does changing the initial
state
> affect the dynamic changes at runtime?
>
> > #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
> > -{ .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift =
wshift, \
> > +{ .id = snd_soc_dapm_micbias, .name = wname, .sname = \
> > + "Mic Bias HiFi Capture", .reg = wreg, .shift = wshift, \
>
> This isn't right, the mic bias clearly shouldn't be associated with a
> stream as you can do capture without microphone (eg, from a line
input)
> and you can have a bypass path with no capture.
next prev parent reply other threads:[~2012-04-26 13:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 20:07 ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted Christoph Fritz
2012-04-26 10:15 ` Christoph Fritz
2012-04-26 11:27 ` Mark Brown
2012-04-26 13:49 ` Christoph Fritz [this message]
2012-04-26 17:20 ` Mark Brown
2012-04-26 21:11 ` Christoph Fritz
2012-04-26 21:37 ` Mark Brown
2012-04-27 8:00 ` Christoph Fritz
2012-04-27 13:46 ` Mark Brown
2012-05-04 13:28 ` Christoph Fritz
2012-05-07 21:55 ` Christoph Fritz
2012-05-07 21:55 ` Christoph Fritz
2012-05-08 10:29 ` Christoph Fritz
2012-05-08 10:29 ` Christoph Fritz
2012-05-12 0:15 ` ASoC: wm9712: Microphone doesn't work: Mux handling broken? Christoph Fritz
2012-05-12 0:15 ` Christoph Fritz
2012-05-12 11:51 ` Mark Brown
2012-05-12 11:51 ` Mark Brown
2012-05-13 3:56 ` Christoph Fritz
2012-05-13 3:56 ` Christoph Fritz
2012-05-15 9:15 ` Christoph Fritz
2012-05-15 9:15 ` Christoph Fritz
2012-05-15 17:15 ` Mark Brown
2012-05-15 17:15 ` Mark Brown
[not found] ` <20120430192258.GA15188@local>
2012-04-30 21:43 ` ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted Mark Brown
[not found] ` <20120430234458.GB15188@local>
2012-05-01 17:12 ` Mark Brown
[not found] ` <20120501200755.GF15188@local>
2012-05-01 22:25 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335448142.20000.40.camel@mars \
--to=chf.fritz@googlemail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=hjk@hansjkoch.de \
--cc=lrg@ti.com \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.