All of lore.kernel.org
 help / color / mirror / Atom feed
* ASoC "long name" generation, without enumerating all machine_is_xxx() calls
@ 2011-05-18 20:07 Stephen Warren
  2011-05-19 11:22 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2011-05-18 20:07 UTC (permalink / raw)
  To: Liam Girdwood (lrg@ti.com); +Cc: alsa-devel@alsa-project.org

Liam,

I have a question about your recent "long name" change:

commit 22de71ba03311cdc1063757c50a1488cb90a1fca
ASoC: core - allow ASoC more flexible machine name

The question is: How to generate the long name. The only example I could
find of this was:

+	if (machine_is_omap_4430sdp())
+		snd_soc_sdp4430.name = "SDP4430";
+	else if (machine_is_omap4_panda())
+		snd_soc_sdp4430.name = "Panda"

(from http://patchwork.ozlabs.org/patch/67831/)

But, I don't really want to call machine_is_xxx for every single machine
the tegra-wm8903 driver can support; upstream there are 5 so far, and
more similar derivatives downstream. That said, I suppose the code is
already switching on machine_is_xxx to pick the correct dapm_route map,
so I could just assign the name there, and fold multiple identical
machines onto a single name.

It looks like the kernel doesn't have any kind of machine_name() API;
the code in e.g. arch/arm/kernel/setup.c that prints the machine name at
boot stores it in a static that's only exposed through syss/similar file.

Thanks for any hints!

-- 
nvpublic

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-19 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-18 20:07 ASoC "long name" generation, without enumerating all machine_is_xxx() calls Stephen Warren
2011-05-19 11:22 ` Liam Girdwood

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.