[alsa-devel] iMac12,2 cirrus_patch.c model detection

Takashi Iwai tiwai at suse.de
Mon May 16 10:26:22 CEST 2011

At Sun, 15 May 2011 21:26:57 +0200,
Jérémy Lal wrote:
> On 15/05/2011 11:53, Takashi Iwai wrote:
> > At Sun, 15 May 2011 10:20:10 +0200,
> > Jérémy Lal wrote:
> >>
> >> Hi,
> >> the imac12,2 27" (model name iMac12,2 from may 2011),
> >> has some headphones bug with your latest patch (the one that adds model=imac27).
> >> More precisions at :
> >> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5364
> >>
> >> I cooked a dirty patch (that fixes all controls that i can test, that is
> >> all analog in/out) and attached it in that bug report.
> >> However, since lspci reports subsystem 0x8086, 0x7270 too,
> >> i can't make that model auto-detected without killing your imac27
> >> patch, see bug report.
> > 
> > The bug tracking system is almost broken and actually no developer
> > is using it.  I proposed to shut it down many times, but it's still
> > present, unfortunately.
> > 
> > Could you post your results to alsa-devel ML and continue discussing
> > there?
> cc-ing alsa-devel, then.
> >> Would you have some advice to make it properly detect "my" model ?
> > 
> > Create a table of codec SSID (not PCI SSID) and check the model via
> > snd_hda_check_board_codec_sid_config() first, then use
> > snd_hda_check_board_config() when no matching entry is found, as
> > fallback.
> That makes sense, and i'll use patch_realtek.c as an example.
> I'm inexperimented in C or alsa, though, so i might fail doing this.

Don't worry, just send your patch, and we'll check it ;)

> > Of course, this assumes that the codec SSID is unique.
> > Hopefully Apple does something right, at least.
> I don't get what you mean.

Well, you know, Apple doesn't set the right pin-config values or
whatever in BIOS level at all while other vendors do that correctly in
BIOS nowadays.  I suspect it's Apple's intentional behavior to hinder
other OS :)

> Anyway bootcamp ships with the cirrus driver
> for windows, which lists all vendor/dev/subsys supported ids, with all
> configurations for pins, gpio, and other stuff i don't understand.
> It's tempting to use that to cover all actual models...
> I'd need to get a minimal knowledge of how intel hda and associated chips
> like cirrus work together. Any advice, beginner's guide ?

The pin-configurations can be re-used almost as is.  And it can be
changed even dynamically.  See Documentation/sound/alsa/HD-Audio.txt.

GPIO setup is  more or less dependent on the codec chip and its driver
implementation.  So for the latter, check the datasheet of the chip.
I guess it should be available somewhere in the net.



More information about the Alsa-devel mailing list