diff options
Diffstat (limited to 'sound/pci/hda/hda_local.h')
| -rw-r--r-- | sound/pci/hda/hda_local.h | 100 |
1 files changed, 93 insertions, 7 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 7957fefda730..6f2fe0f9fdd8 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
| @@ -96,6 +96,8 @@ struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, | |||
| 96 | const char *name); | 96 | const char *name); |
| 97 | int snd_hda_add_vmaster(struct hda_codec *codec, char *name, | 97 | int snd_hda_add_vmaster(struct hda_codec *codec, char *name, |
| 98 | unsigned int *tlv, const char **slaves); | 98 | unsigned int *tlv, const char **slaves); |
| 99 | void snd_hda_codec_reset(struct hda_codec *codec); | ||
| 100 | int snd_hda_codec_configure(struct hda_codec *codec); | ||
| 99 | 101 | ||
| 100 | /* amp value bits */ | 102 | /* amp value bits */ |
| 101 | #define HDA_AMP_MUTE 0x80 | 103 | #define HDA_AMP_MUTE 0x80 |
| @@ -282,6 +284,12 @@ int snd_hda_codec_proc_new(struct hda_codec *codec); | |||
| 282 | static inline int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; } | 284 | static inline int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; } |
| 283 | #endif | 285 | #endif |
| 284 | 286 | ||
| 287 | #define SND_PRINT_RATES_ADVISED_BUFSIZE 80 | ||
| 288 | void snd_print_pcm_rates(int pcm, char *buf, int buflen); | ||
| 289 | |||
| 290 | #define SND_PRINT_BITS_ADVISED_BUFSIZE 16 | ||
| 291 | void snd_print_pcm_bits(int pcm, char *buf, int buflen); | ||
| 292 | |||
| 285 | /* | 293 | /* |
| 286 | * Misc | 294 | * Misc |
| 287 | */ | 295 | */ |
| @@ -364,17 +372,17 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, | |||
| 364 | /* amp values */ | 372 | /* amp values */ |
| 365 | #define AMP_IN_MUTE(idx) (0x7080 | ((idx)<<8)) | 373 | #define AMP_IN_MUTE(idx) (0x7080 | ((idx)<<8)) |
| 366 | #define AMP_IN_UNMUTE(idx) (0x7000 | ((idx)<<8)) | 374 | #define AMP_IN_UNMUTE(idx) (0x7000 | ((idx)<<8)) |
| 367 | #define AMP_OUT_MUTE 0xb080 | 375 | #define AMP_OUT_MUTE 0xb080 |
| 368 | #define AMP_OUT_UNMUTE 0xb000 | 376 | #define AMP_OUT_UNMUTE 0xb000 |
| 369 | #define AMP_OUT_ZERO 0xb000 | 377 | #define AMP_OUT_ZERO 0xb000 |
| 370 | /* pinctl values */ | 378 | /* pinctl values */ |
| 371 | #define PIN_IN (AC_PINCTL_IN_EN) | 379 | #define PIN_IN (AC_PINCTL_IN_EN) |
| 372 | #define PIN_VREFHIZ (AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ) | 380 | #define PIN_VREFHIZ (AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ) |
| 373 | #define PIN_VREF50 (AC_PINCTL_IN_EN | AC_PINCTL_VREF_50) | 381 | #define PIN_VREF50 (AC_PINCTL_IN_EN | AC_PINCTL_VREF_50) |
| 374 | #define PIN_VREFGRD (AC_PINCTL_IN_EN | AC_PINCTL_VREF_GRD) | 382 | #define PIN_VREFGRD (AC_PINCTL_IN_EN | AC_PINCTL_VREF_GRD) |
| 375 | #define PIN_VREF80 (AC_PINCTL_IN_EN | AC_PINCTL_VREF_80) | 383 | #define PIN_VREF80 (AC_PINCTL_IN_EN | AC_PINCTL_VREF_80) |
| 376 | #define PIN_VREF100 (AC_PINCTL_IN_EN | AC_PINCTL_VREF_100) | 384 | #define PIN_VREF100 (AC_PINCTL_IN_EN | AC_PINCTL_VREF_100) |
| 377 | #define PIN_OUT (AC_PINCTL_OUT_EN) | 385 | #define PIN_OUT (AC_PINCTL_OUT_EN) |
| 378 | #define PIN_HP (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN) | 386 | #define PIN_HP (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN) |
| 379 | #define PIN_HP_AMP (AC_PINCTL_HP_EN) | 387 | #define PIN_HP_AMP (AC_PINCTL_HP_EN) |
| 380 | 388 | ||
| @@ -393,10 +401,26 @@ u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction); | |||
| 393 | int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, | 401 | int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, |
| 394 | unsigned int caps); | 402 | unsigned int caps); |
| 395 | 403 | ||
| 404 | int snd_hda_ctl_add(struct hda_codec *codec, struct snd_kcontrol *kctl); | ||
| 405 | void snd_hda_ctls_clear(struct hda_codec *codec); | ||
| 406 | |||
| 396 | /* | 407 | /* |
| 397 | * hwdep interface | 408 | * hwdep interface |
| 398 | */ | 409 | */ |
| 410 | #ifdef CONFIG_SND_HDA_HWDEP | ||
| 399 | int snd_hda_create_hwdep(struct hda_codec *codec); | 411 | int snd_hda_create_hwdep(struct hda_codec *codec); |
| 412 | #else | ||
| 413 | static inline int snd_hda_create_hwdep(struct hda_codec *codec) { return 0; } | ||
| 414 | #endif | ||
| 415 | |||
| 416 | #ifdef CONFIG_SND_HDA_RECONFIG | ||
| 417 | int snd_hda_hwdep_add_sysfs(struct hda_codec *codec); | ||
| 418 | #else | ||
| 419 | static inline int snd_hda_hwdep_add_sysfs(struct hda_codec *codec) | ||
| 420 | { | ||
| 421 | return 0; | ||
| 422 | } | ||
| 423 | #endif | ||
| 400 | 424 | ||
| 401 | /* | 425 | /* |
| 402 | * power-management | 426 | * power-management |
| @@ -430,4 +454,66 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec, | |||
| 430 | #define get_amp_direction(kc) (((kc)->private_value >> 18) & 0x1) | 454 | #define get_amp_direction(kc) (((kc)->private_value >> 18) & 0x1) |
| 431 | #define get_amp_index(kc) (((kc)->private_value >> 19) & 0xf) | 455 | #define get_amp_index(kc) (((kc)->private_value >> 19) & 0xf) |
| 432 | 456 | ||
| 457 | /* | ||
| 458 | * CEA Short Audio Descriptor data | ||
| 459 | */ | ||
| 460 | struct cea_sad { | ||
| 461 | int channels; | ||
| 462 | int format; /* (format == 0) indicates invalid SAD */ | ||
| 463 | int rates; | ||
| 464 | int sample_bits; /* for LPCM */ | ||
| 465 | int max_bitrate; /* for AC3...ATRAC */ | ||
| 466 | int profile; /* for WMAPRO */ | ||
| 467 | }; | ||
| 468 | |||
| 469 | #define ELD_FIXED_BYTES 20 | ||
| 470 | #define ELD_MAX_MNL 16 | ||
| 471 | #define ELD_MAX_SAD 16 | ||
| 472 | |||
| 473 | /* | ||
| 474 | * ELD: EDID Like Data | ||
| 475 | */ | ||
| 476 | struct hdmi_eld { | ||
| 477 | int eld_size; | ||
| 478 | int baseline_len; | ||
| 479 | int eld_ver; /* (eld_ver == 0) indicates invalid ELD */ | ||
| 480 | int cea_edid_ver; | ||
| 481 | char monitor_name[ELD_MAX_MNL + 1]; | ||
| 482 | int manufacture_id; | ||
| 483 | int product_id; | ||
| 484 | u64 port_id; | ||
| 485 | int support_hdcp; | ||
| 486 | int support_ai; | ||
| 487 | int conn_type; | ||
| 488 | int aud_synch_delay; | ||
| 489 | int spk_alloc; | ||
| 490 | int sad_count; | ||
| 491 | struct cea_sad sad[ELD_MAX_SAD]; | ||
| 492 | #ifdef CONFIG_PROC_FS | ||
| 493 | struct snd_info_entry *proc_entry; | ||
| 494 | #endif | ||
| 495 | }; | ||
| 496 | |||
| 497 | int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid); | ||
| 498 | int snd_hdmi_get_eld(struct hdmi_eld *, struct hda_codec *, hda_nid_t); | ||
| 499 | void snd_hdmi_show_eld(struct hdmi_eld *eld); | ||
| 500 | |||
| 501 | #ifdef CONFIG_PROC_FS | ||
| 502 | int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld); | ||
| 503 | void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld); | ||
| 504 | #else | ||
| 505 | static inline int snd_hda_eld_proc_new(struct hda_codec *codec, | ||
| 506 | struct hdmi_eld *eld) | ||
| 507 | { | ||
| 508 | return 0; | ||
| 509 | } | ||
| 510 | static inline void snd_hda_eld_proc_free(struct hda_codec *codec, | ||
| 511 | struct hdmi_eld *eld) | ||
| 512 | { | ||
| 513 | } | ||
| 514 | #endif | ||
| 515 | |||
| 516 | #define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE 80 | ||
| 517 | void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen); | ||
| 518 | |||
| 433 | #endif /* __SOUND_HDA_LOCAL_H */ | 519 | #endif /* __SOUND_HDA_LOCAL_H */ |
