aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c59
1 files changed, 3 insertions, 56 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 526398a4a442..124eacf67fc4 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2602,53 +2602,12 @@ static int patch_alc268(struct hda_codec *codec)
2602 * ALC269 2602 * ALC269
2603 */ 2603 */
2604 2604
2605static int playback_pcm_open(struct hda_pcm_stream *hinfo,
2606 struct hda_codec *codec,
2607 struct snd_pcm_substream *substream)
2608{
2609 struct hda_gen_spec *spec = codec->spec;
2610 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream,
2611 hinfo);
2612}
2613
2614static int playback_pcm_prepare(struct hda_pcm_stream *hinfo,
2615 struct hda_codec *codec,
2616 unsigned int stream_tag,
2617 unsigned int format,
2618 struct snd_pcm_substream *substream)
2619{
2620 struct hda_gen_spec *spec = codec->spec;
2621 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout,
2622 stream_tag, format, substream);
2623}
2624
2625static int playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
2626 struct hda_codec *codec,
2627 struct snd_pcm_substream *substream)
2628{
2629 struct hda_gen_spec *spec = codec->spec;
2630 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
2631}
2632
2633static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = { 2605static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = {
2634 .substreams = 1,
2635 .channels_min = 2,
2636 .channels_max = 8,
2637 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */ 2606 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
2638 /* NID is set in alc_build_pcms */
2639 .ops = {
2640 .open = playback_pcm_open,
2641 .prepare = playback_pcm_prepare,
2642 .cleanup = playback_pcm_cleanup
2643 },
2644}; 2607};
2645 2608
2646static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = { 2609static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = {
2647 .substreams = 1,
2648 .channels_min = 2,
2649 .channels_max = 2,
2650 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */ 2610 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
2651 /* NID is set in alc_build_pcms */
2652}; 2611};
2653 2612
2654/* different alc269-variants */ 2613/* different alc269-variants */
@@ -5850,7 +5809,7 @@ static void alc_fixup_bass_chmap(struct hda_codec *codec,
5850{ 5809{
5851 if (action == HDA_FIXUP_ACT_BUILD) { 5810 if (action == HDA_FIXUP_ACT_BUILD) {
5852 struct alc_spec *spec = codec->spec; 5811 struct alc_spec *spec = codec->spec;
5853 spec->gen.pcm_rec[0].stream[0].chmap = asus_pcm_2_1_chmaps; 5812 spec->gen.pcm_rec[0]->stream[0].chmap = asus_pcm_2_1_chmaps;
5854 } 5813 }
5855} 5814}
5856 5815
@@ -6521,20 +6480,8 @@ MODULE_ALIAS("snd-hda-codec-id:10ec*");
6521MODULE_LICENSE("GPL"); 6480MODULE_LICENSE("GPL");
6522MODULE_DESCRIPTION("Realtek HD-audio codec"); 6481MODULE_DESCRIPTION("Realtek HD-audio codec");
6523 6482
6524static struct hda_codec_preset_list realtek_list = { 6483static struct hda_codec_driver realtek_driver = {
6525 .preset = snd_hda_preset_realtek, 6484 .preset = snd_hda_preset_realtek,
6526 .owner = THIS_MODULE,
6527}; 6485};
6528 6486
6529static int __init patch_realtek_init(void) 6487module_hda_codec_driver(realtek_driver);
6530{
6531 return snd_hda_add_codec_preset(&realtek_list);
6532}
6533
6534static void __exit patch_realtek_exit(void)
6535{
6536 snd_hda_delete_codec_preset(&realtek_list);
6537}
6538
6539module_init(patch_realtek_init)
6540module_exit(patch_realtek_exit)