[alsa-devel] patch for Dell 1210 which using stac9221 codec
Takashi Iwai
tiwai at suse.de
Fri Oct 19 10:39:03 CEST 2007
At Fri, 19 Oct 2007 15:42:09 +0800,
zhejiang wrote:
>
> On Fri, 2007-10-19 at 07:38 +0200, Takashi Iwai wrote:
> > At Fri, 19 Oct 2007 14:02:43 +0800,
> > zhejiang wrote:
> > >
> > > On Thu, 2007-10-18 at 22:55 +0800, Takashi Iwai wrote:
> > > > At Thu, 18 Oct 2007 10:49:16 +0800,
> > > > zhejiang wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > Dell 1210 have three jacks on the front.
> > > > > Two of them serve as output jack and one serve as microphone.
> > > > > The microphone can be switched to output model too.
> > > > >
> > > > > There are some problems with current dell 1210 driver:
> > > > > 1.Unable to use the front microphone
> > > > > 2.Unable to switch the microphone
> > > > > 3.If plug the left hp,another hp will be muted,so it's impossible to
> > > > > work as 6-channel
> > > > >
> > > > > According to the issue 0003427 on alsa-bugzilla,
> > > >
> > > > Oops is bad. Does it still happen with the latest HG tree?
> > > > This should be fixed urgently at first.
> > > >
> > > The oops won't happen with the latest HG tree.
> > > The reason of the oops is that there is no input pin.
> > >
> > > Now the snd_hda_input_mux_put() will check the input_mux.num_items,
> > > if it is equal to zero,snd_hda_input_mux_put() will return directly
> > > and avoid the oops.
> >
> > OK, good to hear.
> >
> > > > > I wrote a patch and the reporter helped me to test it on his
> > > > machine.
> > > > > It can support the front microphone. When switch the microphone to
> > > > > output model, it can mute/unmute the internal speaker with
> > > > jack-sensing.
> > > >
> > > > Thanks for the patch. I have little time right now for checking in
> > > > details, but the changes appear in fairly deep level.
> > >
> > > Yes,It's hard to support such kind of machine with current
> > > stac92xx_parse_auto_config().So my patch changed so many generic
> > > functions. :-).
> > >
> > > > I think we should rather fix the current code to handle multiple
> > > > headphones better than the ad-hoc fixes. Surely there will be other
> > > > models that require similar fixes (if you see Dell has shipped how
> > > > many different variants :)
> > > > Takashi
> > > >
> > >
> > > Great!
> > > I think this model should support:
> > > 1.Each headphone can mute the internal speaker.
> > > 2.Even the Front mic can work output jack
> > > 3.When mic works as output jack,it can mute the internal speaker too.
> > >
> > > Does this make sense? Thanks!
> >
> > This sounds good.
> >
> > Does Dell 1210 have both front and rear mic jacks? I don't know of
> > this machine, so it'd be helpful to understand if you describe the
> > available I/O (PINs and jacks) and expected behavior briefly here.
> > Since sigmatel patch uses the single detection code for every device,
> > we need to cover all possible scenarios with different I/O mappings.
> >
>
> Dell 1210 doesn't have rear mic jacks.
> There are three jacks in the front :
> "Headphone","Headphone","Microphone".
> According to the spec,the mic need to work as output to support 6
> channels mode.
>
> Here is the picture of the jacks:
> http://www.notebookreview.com/assets/12583.jpg
Ah, then it's basically similar like 3-stack model but with two
headphones instead of a pair of line-out and line-in.
Without your modification of pin config, how the driver detects?
Do you have an output of kernel message with debug option about auto
pin configs?
Looking through the sigmatel code, we have several known use cases:
1. desktop
1a. 3stack + front panel
front HP, front mic, rear line-out, rear line-in, rear mic
1b. 6stack + front panel
front HP, front mic, rear line-out, rear surr, rear CLFE
rear side, rear line-in, rear mic
and variants without front panel.
In the case 1a, rear line-in and rear mic can be used as surround
outputs.
2. laptop
2a. minimal
HP, speaker, mic, built-in mic
2b. a la desktop
HP, speaker, line-in, mic, built-in mic
2c. dell
HP x 2, speaker(s), mic, built-in mic
Now, the case 2c requires a similar hack. But, before going more
deeply, it's better to recheck patch_sigmatel.c again. Basically, it
has already the code to add output sharing using line-in/mic-in. The
problem is that it checks only limited use-cases (1a) and it adds
cfg->line_outs and thus this influences on all other places.
So, above all, a bit more cleaner implementation would be preferred...
Takashi
More information about the Alsa-devel
mailing list