atihdmi.c (73cd0490819d2a693928c5977280dd31b756cb42) | atihdmi.c (ad781b550f9a8829e3dae4bd3d18c4a126a53d04) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * ATI/AMD codec support 4 */ 5 6#include <linux/init.h> 7#include <linux/slab.h> 8#include <linux/module.h> --- 514 unchanged lines hidden (view full) --- 523 524static const struct drm_audio_component_audio_ops atihdmi_audio_ops = { 525 .pin2port = atihdmi_pin2port, 526 .pin_eld_notify = snd_hda_hdmi_acomp_pin_eld_notify, 527 .master_bind = snd_hda_hdmi_acomp_master_bind, 528 .master_unbind = snd_hda_hdmi_acomp_master_unbind, 529}; 530 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * ATI/AMD codec support 4 */ 5 6#include <linux/init.h> 7#include <linux/slab.h> 8#include <linux/module.h> --- 514 unchanged lines hidden (view full) --- 523 524static const struct drm_audio_component_audio_ops atihdmi_audio_ops = { 525 .pin2port = atihdmi_pin2port, 526 .pin_eld_notify = snd_hda_hdmi_acomp_pin_eld_notify, 527 .master_bind = snd_hda_hdmi_acomp_master_bind, 528 .master_unbind = snd_hda_hdmi_acomp_master_unbind, 529}; 530 |
531static int patch_atihdmi(struct hda_codec *codec) | 531static int atihdmi_probe(struct hda_codec *codec, const struct hda_device_id *id) |
532{ 533 struct hdmi_spec *spec; 534 struct hdmi_spec_per_cvt *per_cvt; 535 int err, cvt_idx; 536 | 532{ 533 struct hdmi_spec *spec; 534 struct hdmi_spec_per_cvt *per_cvt; 535 int err, cvt_idx; 536 |
537 err = patch_generic_hdmi(codec); 538 | 537 err = snd_hda_hdmi_generic_probe(codec); |
539 if (err) 540 return err; 541 | 538 if (err) 539 return err; 540 |
542 codec->patch_ops.init = atihdmi_init; 543 | |
544 spec = codec->spec; 545 546 spec->static_pcm_mapping = true; 547 548 spec->ops.pin_get_eld = atihdmi_pin_get_eld; 549 spec->ops.pin_setup_infoframe = atihdmi_pin_setup_infoframe; 550 spec->ops.pin_hbr_setup = atihdmi_pin_hbr_setup; 551 spec->ops.setup_stream = atihdmi_setup_stream; --- 26 unchanged lines hidden (view full) --- 578 */ 579 codec->link_down_at_suspend = 1; 580 581 snd_hda_hdmi_acomp_init(codec, &atihdmi_audio_ops, atihdmi_port2pin); 582 583 return 0; 584} 585 | 541 spec = codec->spec; 542 543 spec->static_pcm_mapping = true; 544 545 spec->ops.pin_get_eld = atihdmi_pin_get_eld; 546 spec->ops.pin_setup_infoframe = atihdmi_pin_setup_infoframe; 547 spec->ops.pin_hbr_setup = atihdmi_pin_hbr_setup; 548 spec->ops.setup_stream = atihdmi_setup_stream; --- 26 unchanged lines hidden (view full) --- 575 */ 576 codec->link_down_at_suspend = 1; 577 578 snd_hda_hdmi_acomp_init(codec, &atihdmi_audio_ops, atihdmi_port2pin); 579 580 return 0; 581} 582 |
583static const struct hda_codec_ops atihdmi_codec_ops = { 584 .probe = atihdmi_probe, 585 .remove = snd_hda_hdmi_generic_remove, 586 .init = atihdmi_init, 587 .build_pcms = snd_hda_hdmi_generic_build_pcms, 588 .build_controls = snd_hda_hdmi_generic_build_controls, 589 .unsol_event = snd_hda_hdmi_generic_unsol_event, 590 .suspend = snd_hda_hdmi_generic_suspend, 591 .resume = snd_hda_hdmi_generic_resume, 592}; 593 |
|
586/* | 594/* |
587 * patch entries | 595 * driver entries |
588 */ 589static const struct hda_device_id snd_hda_id_atihdmi[] = { | 596 */ 597static const struct hda_device_id snd_hda_id_atihdmi[] = { |
590HDA_CODEC_ENTRY(0x1002793c, "RS600 HDMI", patch_atihdmi), 591HDA_CODEC_ENTRY(0x10027919, "RS600 HDMI", patch_atihdmi), 592HDA_CODEC_ENTRY(0x1002791a, "RS690/780 HDMI", patch_atihdmi), 593HDA_CODEC_ENTRY(0x1002aa01, "R6xx HDMI", patch_atihdmi), 594{} /* terminator */ | 598 HDA_CODEC_ID(0x1002793c, "RS600 HDMI"), 599 HDA_CODEC_ID(0x10027919, "RS600 HDMI"), 600 HDA_CODEC_ID(0x1002791a, "RS690/780 HDMI"), 601 HDA_CODEC_ID(0x1002aa01, "R6xx HDMI"), 602 {} /* terminator */ |
595}; 596MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_atihdmi); 597 598MODULE_LICENSE("GPL"); 599MODULE_DESCRIPTION("AMD/ATI HDMI HD-audio codec"); 600MODULE_IMPORT_NS("SND_HDA_CODEC_HDMI"); 601 602static struct hda_codec_driver atihdmi_driver = { 603 .id = snd_hda_id_atihdmi, | 603}; 604MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_atihdmi); 605 606MODULE_LICENSE("GPL"); 607MODULE_DESCRIPTION("AMD/ATI HDMI HD-audio codec"); 608MODULE_IMPORT_NS("SND_HDA_CODEC_HDMI"); 609 610static struct hda_codec_driver atihdmi_driver = { 611 .id = snd_hda_id_atihdmi, |
612 .ops = &atihdmi_codec_ops, |
|
604}; 605 606module_hda_codec_driver(atihdmi_driver); | 613}; 614 615module_hda_codec_driver(atihdmi_driver); |