Skip to contentSkip to conversation

size of snd_hda_intel

DISCUSSION Jon Smirl 5 participants 9 messages Oct 5, 2008 – Oct 7, 2008

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw
Quoted 1 line

ismod

snd_hda_intel 435,772

435,772 bytes seems awfully large for an audio driver. The large size seems to be due to having support for multiple codecs in the driver. Could a generic hda driver load the correct codec dynamically instead of building them all in statically?

I have a Realtek codec.

Signature · 2 lines
Jon Smirl
[email protected]
#1 lore raw

Hi,

Quoted 10 lines · Jon Smirl
Quoted 1 line

ismod

snd_hda_intel 435,772

435,772 bytes seems awfully large for an audio driver. The large size seems to be due to having support for multiple codecs in the driver. Could a generic hda driver load the correct codec dynamically instead of building them all in statically?

I have a Realtek codec.

snd_hda_intel should probably be rearchitected to be similar to the way that snd-aoa works... e.g. multiple modules for codecs, etc.

But, that's a lot of effort, and I don't personally have the hardware to test (only one box of mine has HDA audio that I know of, and I use a better card there), or I would start working on making that happen.

William

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
In reply to Jon Smirl

At Sun, 5 Oct 2008 18:19:05 -0400,

Quoted 8 lines · Jon Smirl
Quoted 2 lines

ismod

snd_hda_intel 435,772

435,772 bytes seems awfully large for an audio driver. The large size seems to be due to having support for multiple codecs in the driver. Could a generic hda driver load the correct codec dynamically instead of building them all in statically?

Splitting to modules is no essential solution.
But, a lot of works are undergoing.

Takashi

#3 lore raw
In reply to Jon Smirl

I believe this isn't that easy. Here is why: iff you look at the ice1712/ice1724 driver, it doesn't detect dependencies when modprobed; that is, it loads, for example, ac97 codec and ak4xxx driver even if the card doesn't have any of that. Is it even possible to detect dependencies after modprobing?

2008/10/6 Jon Smirl <[email protected]>:

Quoted 18 lines
Quoted 1 line

ismod

snd_hda_intel 435,772

435,772 bytes seems awfully large for an audio driver. The large size seems to be due to having support for multiple codecs in the driver. Could a generic hda driver load the correct codec dynamically instead of building them all in statically?

I have a Realtek codec.

--
Jon Smirl
[email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 5 lines
Vedran Miletić
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
author
#4 lore raw
Quoted 5 lines · Vedran Miletić

I believe this isn't that easy. Here is why: iff you look at the ice1712/ice1724 driver, it doesn't detect dependencies when modprobed; that is, it loads, for example, ac97 codec and ak4xxx driver even if the card doesn't have any of that. Is it even possible to detect dependencies after modprobing?

The base intel hda module would include code to figure out which codec is attached. It can then use loadmodule() to dynamically load it. ASOC use the separate codec driver model.

It would look like a "hda" bus in sysfs with the "codec" module sitting on it.

Quoted 26 lines

2008/10/6 Jon Smirl <[email protected]>:

Quoted 10 lines
Quoted 1 line

ismod

snd_hda_intel 435,772

435,772 bytes seems awfully large for an audio driver. The large size seems to be due to having support for multiple codecs in the driver. Could a generic hda driver load the correct codec dynamically instead of building them all in statically?

I have a Realtek codec.

Quoted 8 lines

--
Jon Smirl
[email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

--
Vedran Miletić

Signature · 2 lines
Jon Smirl
[email protected]
#5 lore raw

At Mon, 6 Oct 2008 21:29:32 -0400,

Quoted 11 lines · Jon Smirl
Quoted 5 lines · Vedran Miletić

I believe this isn't that easy. Here is why: iff you look at the ice1712/ice1724 driver, it doesn't detect dependencies when modprobed; that is, it loads, for example, ac97 codec and ak4xxx driver even if the card doesn't have any of that. Is it even possible to detect dependencies after modprobing?

The base intel hda module would include code to figure out which codec is attached. It can then use loadmodule() to dynamically load it. ASOC use the separate codec driver model.

You mean AOA?
ASoC doesn't do any dynamic module handling by itself, AFAIK.

Quoted 1 line

It would look like a "hda" bus in sysfs with the "codec" module sitting on it.

Well, originally there shouldn't have been so many codec variants. The current situation came up due to a couple of obvious reasons...

Ayway, the current plan is to develop an improved generic parser and add the capability to extra setup for each hardware, either dynamically or statically. In that way, the whole static function callbacks and mixer arrays can be removed or replaced with smaller hints.

The codec reconfigure patches are already in my tree in topic/hda-reconfig branch, and the improvement of generic parser is under development.

Takashi

Quoted 37 lines
Quoted 26 lines

2008/10/6 Jon Smirl <[email protected]>:

Quoted 10 lines
Quoted 1 line

ismod

snd_hda_intel 435,772

435,772 bytes seems awfully large for an audio driver. The large size seems to be due to having support for multiple codecs in the driver. Could a generic hda driver load the correct codec dynamically instead of building them all in statically?

I have a Realtek codec.

Quoted 8 lines

--
Jon Smirl
[email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

--
Vedran Miletić

Signature · 6 lines
Jon Smirl
[email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#6 lore raw
Quoted 8 lines · Takashi Iwai
Quoted 3 lines · Jon Smirl

The base intel hda module would include code to figure out which codec is attached. It can then use loadmodule() to dynamically load it. ASOC use the separate codec driver model.

You mean AOA?
ASoC doesn't do any dynamic module handling by itself, AFAIK.

It does this through reuse of the standard module loader - the machine drivers all have references to the codec and platform driver modules so providing something can figure out how to load the only relevant machine driver only the codec and platform drivers for that machine will be loaded.

v2 pretty much keeps on with the same model, though codec and platform drivers will be able to be instantiated via means other than the machine drivers.

author
#7 lore raw
In reply to Takashi Iwai

2008/10/7 Takashi Iwai <[email protected]>:

Quoted 10 lines

At Mon, 6 Oct 2008 21:29:32 -0400,

Quoted 8 lines · Jon Smirl
Quoted 5 lines · Vedran Miletić

I believe this isn't that easy. Here is why: iff you look at the ice1712/ice1724 driver, it doesn't detect dependencies when modprobed; that is, it loads, for example, ac97 codec and ak4xxx driver even if the card doesn't have any of that. Is it even possible to detect dependencies after modprobing?

Quoted 6 lines
Quoted 3 lines

The base intel hda module would include code to figure out which codec is attached. It can then use loadmodule() to dynamically load it. ASOC use the separate codec driver model.

You mean AOA?
ASoC doesn't do any dynamic module handling by itself, AFAIK.

This lets you load another module from intel_hda:

        request_module("%s", module_name);
Quoted 57 lines
Quoted 1 line

It would look like a "hda" bus in sysfs with the "codec" module sitting on it.

Well, originally there shouldn't have been so many codec variants. The current situation came up due to a couple of obvious reasons...

Ayway, the current plan is to develop an improved generic parser and add the capability to extra setup for each hardware, either dynamically or statically. In that way, the whole static function callbacks and mixer arrays can be removed or replaced with smaller hints.

The codec reconfigure patches are already in my tree in topic/hda-reconfig branch, and the improvement of generic parser is under development.

Takashi

Quoted 37 lines
Quoted 23 lines

2008/10/6 Jon Smirl <[email protected]>:

Quoted 10 lines
Quoted 1 line

ismod

snd_hda_intel 435,772

435,772 bytes seems awfully large for an audio driver. The large size seems to be due to having support for multiple codecs in the driver. Could a generic hda driver load the correct codec dynamically instead of building them all in statically?

I have a Realtek codec.

Quoted 8 lines

--
Jon Smirl
[email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 3 lines

--
Vedran Miletić

--
Jon Smirl
[email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 2 lines
Jon Smirl
[email protected]
#8 lore raw

At Tue, 7 Oct 2008 08:28:49 -0400,

Quoted 16 lines · Jon Smirl

2008/10/7 Takashi Iwai <[email protected]>:

Quoted 14 lines

At Mon, 6 Oct 2008 21:29:32 -0400,

Quoted 11 lines · Jon Smirl
Quoted 5 lines · Vedran Miletić

I believe this isn't that easy. Here is why: iff you look at the ice1712/ice1724 driver, it doesn't detect dependencies when modprobed; that is, it loads, for example, ac97 codec and ak4xxx driver even if the card doesn't have any of that. Is it even possible to detect dependencies after modprobing?

The base intel hda module would include code to figure out which codec is attached. It can then use loadmodule() to dynamically load it. ASOC use the separate codec driver model.

Quoted 6 lines
Quoted 2 lines

You mean AOA?
ASoC doesn't do any dynamic module handling by itself, AFAIK.

This lets you load another module from intel_hda:

        request_module("%s", module_name);

As mentioned, it's no fundamental solution.
The real problem is that the driver has too many stuff that can be trimmed down.

Takashi