* Support for platform bus
@ 2005-08-31 23:42 Adrian McMenamin
2005-09-01 4:12 ` Lee Revell
2005-09-01 14:44 ` Takashi Iwai
0 siblings, 2 replies; 4+ messages in thread
From: Adrian McMenamin @ 2005-08-31 23:42 UTC (permalink / raw)
To: alsa-devel
I am attempting to write an ALSA driver for the sound card on the
Dreamcast.
I have this in the code:
snd_card_set_dev(dreamcastcard, &platform_bus);
No errors are reported but the card doesn't show up in sysfs as a device
registered to the platform bus - is this because I need to do more to
force the device to appear there? (it doesn't appear under any bus but
it does show up as a module in sysfs):
sh-3.00# cd module
sh-3.00# ls -l
drwxr-xr-x 3 root root 0 Aug 31 18:23 lockd
drwxr-xr-x 3 root root 0 Aug 31 18:23 psmouse
drwxr-xr-x 3 root root 0 Aug 31 18:26 snd
drwxr-xr-x 2 root root 0 Aug 31 18:26 snd_card_aica
drwxr-xr-x 2 root root 0 Aug 31 18:26 soundcore
sh-3.00# ls -l snd_card_aica/
-r--r--r-- 1 root root 4096 Aug 31 18:29 refcnt
Please cc me into any replies as I am not (yet - mailman seems slow)
subscribed to the list.
Thanks
Adrian
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Support for platform bus
2005-08-31 23:42 Support for platform bus Adrian McMenamin
@ 2005-09-01 4:12 ` Lee Revell
2005-09-01 6:55 ` Adrian McMenamin
2005-09-01 14:44 ` Takashi Iwai
1 sibling, 1 reply; 4+ messages in thread
From: Lee Revell @ 2005-09-01 4:12 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: alsa-devel
On Thu, 2005-09-01 at 00:42 +0100, Adrian McMenamin wrote:
> I am attempting to write an ALSA driver for the sound card on the
> Dreamcast.
Please post your driver source code.
Lee
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Support for platform bus
2005-09-01 4:12 ` Lee Revell
@ 2005-09-01 6:55 ` Adrian McMenamin
0 siblings, 0 replies; 4+ messages in thread
From: Adrian McMenamin @ 2005-09-01 6:55 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel
On Thu, 2005-09-01 at 00:12 -0400, Lee Revell wrote:
> On Thu, 2005-09-01 at 00:42 +0100, Adrian McMenamin wrote:
> > I am attempting to write an ALSA driver for the sound card on the
> > Dreamcast.
>
> Please post your driver source code.
>
> Lee
Anybody who wants to see all of it can look at
http://newgolddream.dyndns.info/repos but here's the relevant bit
(obviously this is a work in progress so be gentle with me):
static int __init aica_pcm_init(void)
{
int err;
int idx;
struct snd_aicapcmchip *chip;
snd_printk("Probing for AICA device\n");
/* Are we in a Dreamcast at all? */
if (!mach_is_dreamcast()) return -ENODEV;
dreamcastcard = NULL;
/* Can only be one real device on a Dreamcast
but we might have the dummy or some other driver loaded */
for (idx = 0; idx < SNDRV_CARDS; idx++)
{
dreamcastcard = snd_card_new(idx, "AICA", THIS_MODULE, 0);
if (dreamcastcard) break;
}
if (!dreamcastcard) return -ENODEV;
strcpy(dreamcastcard->shortname, "AICA ");
strcpy(dreamcastcard->longname, "Dreamcast AICA PCM Sound device ");
/* Load the PCM 'chip' */
if ((err = snd_aicapcmchip(dreamcastcard, &chip)) < 0) {
snd_card_free(dreamcastcard);
snd_printk("Could not initialise AICA PCM device\n");
return err;
}
/* Set up the ALSA PCM subsystem */
/* register with sysfs etc - this is not on a 'proper' bus so just use
the generic */
snd_card_set_dev(dreamcastcard, &platform_bus);
/* Register the card with ALSA subsystem */
if ((err = snd_card_register(dreamcastcard)) < 0) {
snd_card_free(dreamcastcard);
return err;
}
snd_printk("Dreamcast AICA device registered on slot %d\n", idx);
return 0;
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Support for platform bus
2005-08-31 23:42 Support for platform bus Adrian McMenamin
2005-09-01 4:12 ` Lee Revell
@ 2005-09-01 14:44 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2005-09-01 14:44 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: alsa-devel
At Thu, 01 Sep 2005 00:42:36 +0100,
Adrian McMenamin wrote:
>
> I am attempting to write an ALSA driver for the sound card on the
> Dreamcast.
>
> I have this in the code:
>
> snd_card_set_dev(dreamcastcard, &platform_bus);
The second argument is the pointer to struct device.
You should have got a compiler warning about pointer cast.
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-09-01 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-31 23:42 Support for platform bus Adrian McMenamin
2005-09-01 4:12 ` Lee Revell
2005-09-01 6:55 ` Adrian McMenamin
2005-09-01 14:44 ` Takashi Iwai
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.