diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-03-22 14:53:50 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-03-22 14:53:50 +0100 |
commit | 98bd11152b5b8725b26d803dfdf205dc989d9832 (patch) | |
tree | 205b5de14c187db4695e2c71ed19117b6173bb88 /sound/pci/hda/hda_generic.h | |
parent | Merge branch 'for-linus' into for-next (diff) | |
download | linux-98bd11152b5b8725b26d803dfdf205dc989d9832.tar.xz linux-98bd11152b5b8725b26d803dfdf205dc989d9832.zip |
ALSA: hda - Allow codec drivers to give own badness tables
The standard badness values don't seem to fit to all preferences.
Some configuration prefer the side output over the headphone, some
want the speaker over the surround, etc.
This patch moves the badness table pointers into hda_gen_spec, so that
the codec driver can override them.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.h')
-rw-r--r-- | sound/pci/hda/hda_generic.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 39d83943f25d..54e665160379 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h @@ -76,6 +76,19 @@ enum { HDA_GEN_PCM_ACT_CLOSE, }; +/* DAC assignment badness table */ +struct badness_table { + int no_primary_dac; /* no primary DAC */ + int no_dac; /* no secondary DACs */ + int shared_primary; /* primary DAC is shared with main output */ + int shared_surr; /* secondary DAC shared with main or primary */ + int shared_clfe; /* third DAC shared with main or primary */ + int shared_surr_main; /* secondary DAC sahred with main/DAC0 */ +}; + +extern const struct badness_table hda_main_out_badness; +extern const struct badness_table hda_extra_out_badness; + struct hda_gen_spec { char stream_name_analog[32]; /* analog PCM stream */ const struct hda_pcm_stream *stream_analog_playback; @@ -223,6 +236,10 @@ struct hda_gen_spec { unsigned int have_aamix_ctl:1; unsigned int hp_mic_jack_modes:1; + /* badness tables for output path evaluations */ + const struct badness_table *main_out_badness; + const struct badness_table *extra_out_badness; + /* loopback mixing mode */ bool aamix_mode; |