diff options
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 7c1eb23f0cec..b20e1cede00b 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <sound/core.h> | 27 | #include <sound/core.h> |
28 | #include "hda_codec.h" | 28 | #include "hda_codec.h" |
29 | #include "hda_local.h" | 29 | #include "hda_local.h" |
30 | #include "hda_patch.h" | ||
31 | 30 | ||
32 | #define CXT_PIN_DIR_IN 0x00 | 31 | #define CXT_PIN_DIR_IN 0x00 |
33 | #define CXT_PIN_DIR_OUT 0x01 | 32 | #define CXT_PIN_DIR_OUT 0x01 |
@@ -86,8 +85,6 @@ struct conexant_spec { | |||
86 | 85 | ||
87 | /* dynamic controls, init_verbs and input_mux */ | 86 | /* dynamic controls, init_verbs and input_mux */ |
88 | struct auto_pin_cfg autocfg; | 87 | struct auto_pin_cfg autocfg; |
89 | unsigned int num_kctl_alloc, num_kctl_used; | ||
90 | struct snd_kcontrol_new *kctl_alloc; | ||
91 | struct hda_input_mux private_imux; | 88 | struct hda_input_mux private_imux; |
92 | hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; | 89 | hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; |
93 | 90 | ||
@@ -344,15 +341,6 @@ static int conexant_init(struct hda_codec *codec) | |||
344 | 341 | ||
345 | static void conexant_free(struct hda_codec *codec) | 342 | static void conexant_free(struct hda_codec *codec) |
346 | { | 343 | { |
347 | struct conexant_spec *spec = codec->spec; | ||
348 | unsigned int i; | ||
349 | |||
350 | if (spec->kctl_alloc) { | ||
351 | for (i = 0; i < spec->num_kctl_used; i++) | ||
352 | kfree(spec->kctl_alloc[i].name); | ||
353 | kfree(spec->kctl_alloc); | ||
354 | } | ||
355 | |||
356 | kfree(codec->spec); | 344 | kfree(codec->spec); |
357 | } | 345 | } |
358 | 346 | ||
@@ -1782,7 +1770,7 @@ static int patch_cxt5051(struct hda_codec *codec) | |||
1782 | /* | 1770 | /* |
1783 | */ | 1771 | */ |
1784 | 1772 | ||
1785 | struct hda_codec_preset snd_hda_preset_conexant[] = { | 1773 | static struct hda_codec_preset snd_hda_preset_conexant[] = { |
1786 | { .id = 0x14f15045, .name = "CX20549 (Venice)", | 1774 | { .id = 0x14f15045, .name = "CX20549 (Venice)", |
1787 | .patch = patch_cxt5045 }, | 1775 | .patch = patch_cxt5045 }, |
1788 | { .id = 0x14f15047, .name = "CX20551 (Waikiki)", | 1776 | { .id = 0x14f15047, .name = "CX20551 (Waikiki)", |
@@ -1791,3 +1779,28 @@ struct hda_codec_preset snd_hda_preset_conexant[] = { | |||
1791 | .patch = patch_cxt5051 }, | 1779 | .patch = patch_cxt5051 }, |
1792 | {} /* terminator */ | 1780 | {} /* terminator */ |
1793 | }; | 1781 | }; |
1782 | |||
1783 | MODULE_ALIAS("snd-hda-codec-id:14f15045"); | ||
1784 | MODULE_ALIAS("snd-hda-codec-id:14f15047"); | ||
1785 | MODULE_ALIAS("snd-hda-codec-id:14f15051"); | ||
1786 | |||
1787 | MODULE_LICENSE("GPL"); | ||
1788 | MODULE_DESCRIPTION("Conexant HD-audio codec"); | ||
1789 | |||
1790 | static struct hda_codec_preset_list conexant_list = { | ||
1791 | .preset = snd_hda_preset_conexant, | ||
1792 | .owner = THIS_MODULE, | ||
1793 | }; | ||
1794 | |||
1795 | static int __init patch_conexant_init(void) | ||
1796 | { | ||
1797 | return snd_hda_add_codec_preset(&conexant_list); | ||
1798 | } | ||
1799 | |||
1800 | static void __exit patch_conexant_exit(void) | ||
1801 | { | ||
1802 | snd_hda_delete_codec_preset(&conexant_list); | ||
1803 | } | ||
1804 | |||
1805 | module_init(patch_conexant_init) | ||
1806 | module_exit(patch_conexant_exit) | ||