sound: oxygen: better defaults for upmixing control
On card models with two-channel outputs, the base driver can automatically disable the upmixing control so that the model drivers do not need to do this. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
268304f4c4
commit
75919d7c05
@ -141,19 +141,11 @@ static void set_cs5340_params(struct oxygen *chip,
|
|||||||
|
|
||||||
static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
|
static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
|
||||||
|
|
||||||
static int hifier_control_filter(struct snd_kcontrol_new *template)
|
|
||||||
{
|
|
||||||
if (!strcmp(template->name, "Stereo Upmixing"))
|
|
||||||
return 1; /* stereo only - we don't need upmixing */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct oxygen_model model_hifier = {
|
static const struct oxygen_model model_hifier = {
|
||||||
.shortname = "C-Media CMI8787",
|
.shortname = "C-Media CMI8787",
|
||||||
.longname = "C-Media Oxygen HD Audio",
|
.longname = "C-Media Oxygen HD Audio",
|
||||||
.chip = "CMI8788",
|
.chip = "CMI8788",
|
||||||
.init = hifier_init,
|
.init = hifier_init,
|
||||||
.control_filter = hifier_control_filter,
|
|
||||||
.cleanup = hifier_cleanup,
|
.cleanup = hifier_cleanup,
|
||||||
.resume = hifier_resume,
|
.resume = hifier_resume,
|
||||||
.set_dac_params = set_ak4396_params,
|
.set_dac_params = set_ak4396_params,
|
||||||
|
@ -954,6 +954,9 @@ static int add_controls(struct oxygen *chip,
|
|||||||
if (err == 1)
|
if (err == 1)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!strcmp(template.name, "Stereo Upmixing") &&
|
||||||
|
chip->model.dac_channels == 2)
|
||||||
|
continue;
|
||||||
if (!strcmp(template.name, "Master Playback Volume") &&
|
if (!strcmp(template.name, "Master Playback Volume") &&
|
||||||
chip->model.dac_tlv) {
|
chip->model.dac_tlv) {
|
||||||
template.tlv.p = chip->model.dac_tlv;
|
template.tlv.p = chip->model.dac_tlv;
|
||||||
|
@ -605,8 +605,6 @@ static int xonar_st_control_filter(struct snd_kcontrol_new *template)
|
|||||||
{
|
{
|
||||||
if (!strncmp(template->name, "CD Capture ", 11))
|
if (!strncmp(template->name, "CD Capture ", 11))
|
||||||
return 1; /* no CD input */
|
return 1; /* no CD input */
|
||||||
if (!strcmp(template->name, "Stereo Upmixing"))
|
|
||||||
return 1; /* stereo only - we don't need upmixing */
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user