Skip to contentSkip to conversation

Help with snd_card_set_dev

DISCUSSION [email protected] 2 participants 2 messages Oct 2, 2006 – Oct 4, 2006

lore
Share & tools
lore
#0 lore raw

What are "snd_card_set_dev" and "snd_card_set_generic_dev" good for?
I read the Writing ALSA drivers by Takashi Iwai but didn't understand the chapter on it. How can snd_card_set_dev be useful if it is ones passed a struct for PCI and then for ISA?

Matthias Goerner

Signature · 8 lines
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#1 lore raw

At Mon, 02 Oct 2006 20:30:44 +0200,

Quoted 5 lines · [email protected] wrote:

What are "snd_card_set_dev" and "snd_card_set_generic_dev" good for? I read the Writing ALSA drivers by Takashi Iwai but didn't understand the chapter on it. How can snd_card_set_dev be useful if it is ones passed a struct for PCI and then for ISA?

The driver core requires the struct device pointer for sysfs. This is referred by HAL later and almost mandatory.

The snd_card_set_dev() macro is introduced just for the backward compatibility with 2.2/2.4 kernels. In the 2.6 kernels, it just do

	card->dev = &pci_dev->dev;

snd_card_set_generic_dev() is obsolete and no longer used.

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV