[snd] looking for layout-ids
Johannes Berg
johannes at sipsolutions.net
Fri May 26 09:02:49 EST 2006
On Thu, 2006-05-25 at 23:49 +0100, Ken Moffat wrote:
> > > CC [M] /home/ken/snd-aoa/soundbus/core.o
> > > In file included from /home/ken/snd-aoa/soundbus/soundbus.h:12,
> > > from /home/ken/snd-aoa/soundbus/core.c:12:
> > > include/sound/pcm.h:59: warning: ‘struct snd_pcm_substream’ declared
> > > inside parameter list
> > > include/sound/pcm.h:59: warning: its scope is only this definition
> > > or declaration, which is probably not what you want
> > > include/sound/pcm.h:60: warning: ‘struct snd_pcm_substream’ declared
> > > inside parameter list
> >
> > Nah, those should not happen. What kernel are you building against?
> >
> 2.6.17-rc5. I had similar messages when I first tried snd-aoa,
> which would have been around 2.6.16.5.
Hm, ok, I'm currently testing against 2.6.17-rc4 so that ought to be
fine unless they had a large alsa code drop which can't really be
between -rc4 and -rc5 :)
> Must be the headers causing the problem then. I wonder if it's
> somehow using userspace headers - I might have had some 'unvalidated'
> headers in /usr/include/sound [1]. Will take a look tomorrow,
> although I've installed alsa lib after building snd-aoa, so that
> probably updated the headers.
Very strange, I don't think it should be trying to include *anything*
from /usr/include for userspace. And the line numbers match the kernel
line numbers.
But looking at the header file again, I don't quite understand why it
should even work at all.
It (pcm.h) first uses struct snd_pcm_substream:
struct snd_pcm_ops {
int (*open)(struct snd_pcm_substream *substream);
int (*close)(struct snd_pcm_substream *substream);
(these are the lines that give the warnings above)
and then defines it much much later in line 344... Odd. I suppose gcc
4.1.0 is more struct. Try adding to pcm.h, around line 57, just the
definition like so:
struct snd_pcm_substream;
In any case, I don't think that's the actual problem. I think the point
is that your machine isn't supported yet, can you try the patch below?
But please let me know if _noheadphones is correct, it probably isn't
and you need to tell me what connectors you have on the outside of the
box.
johannes
--- snd-aoa.orig/aoa/fabrics/snd-aoa-fabric-layout.c 2006-05-26 01:01:17.189771119 +0200
+++ snd-aoa/aoa/fabrics/snd-aoa-fabric-layout.c 2006-05-26 01:01:42.819771119 +0200
@@ -80,6 +80,8 @@ struct layout {
MODULE_ALIAS("sound-layout-82");
MODULE_ALIAS("sound-layout-45");
+MODULE_ALIAS("sound-layout-60");
+MODULE_ALIAS("sound-layout-61");
MODULE_ALIAS("sound-layout-64");
MODULE_ALIAS("sound-layout-65");
MODULE_ALIAS("sound-layout-68");
@@ -161,6 +163,21 @@ static struct layout layouts[] = {
.connections = NULL /* TBD */,
},
},
+ /* PowerMac9,1 */
+ { .layout_id = 60,
+ .flags = LAYOUT_FLAG_COMBO_LINEOUT_SPDIF,
+ .codecs[0] = {
+ .name = "onyx",
+ .connections = onyx_connections_noheadphones,
+ },
+ },
+ /* PowerMac9,1 */
+ { .layout_id = 61,
+ .codecs[0] = {
+ .name = "topaz",
+ .connections = NULL, /* TBD */
+ },
+ },
/* PowerBook5,7 */
{ .layout_id = 64,
.flags = LAYOUT_FLAG_COMBO_LINEOUT_SPDIF,
More information about the Linuxppc-dev
mailing list