sound fixes #2 for 4.2-final
Here are stable fixes that have been gathered since rc8: fixes for HD-audio widget power controll regressions since 4.1, a NULL fix for HD-audio HDMI, a noise fix for Conexant codecs and a quirk addition for USB-Audio DSD. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJV4Cr3AAoJEGwxgFQ9KSmkxkAQAKuvnsbFCIjMvC58ZxiezFaq 65VL9UatBzT20OM2bg1UkLdTArqpfxQuzv+dzf3quLLSgW9YEAjL7BwIzsMDZfQQ 8/GqkyHAKQc8e5Sp/ISKRzySp6YjXDZ4bnLafFvc/Do56L/uDD1DSI0Ln4Bh7TDR GdG4NdCQSdZEesgkBT5sT4uHa4btK8BxKviTDwilkUu2IV2ID0eYS1/8x6GJ9pTh JBqhnjQF6+viBCt/5zPWR9ClHHp01nDZn4V2uFUSDTZkjUBAUEdUQpJdx1tB8N+L Bn1a9w5IZ9EvxK7V7vE08/j5YXSC3W7QiSybamRP3Cl0VIS7GEZaqJRCvH7BqGOG e2D3kCQDM3YNta4btR+6MDKGCYMSWNxPMAZyxY8wQGI1Q2S8JR/NlFmfFvbzZcl/ lg1mBYAxT9NGcLoLSwMnIQMyusDEWP9ozIMq+5nVTarm2rynCDGAeTfIIn1//5VR GuLM4HYC3Jknvy+t4iMNRglgJdkMKpzXGD0sVQR9DFg1moLyX3YdZMwWVe2vuDR4 R+ZxFG2a9CidiGUHh4Be75MnnDf9/9ubK/REF3gkAWgrvgBlJvlhzGDpuXdC+kHx 2hJ7LixImpbB9t6z0VcjsWSQ5zKN26TpKdNuB64oiAA6KqXZBQXEU0UFJTk3vHiH 8U1P6BBKSE7k2zNgV2PK =O9dr -----END PGP SIGNATURE----- Merge tag 'sound-fix-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are stable fixes that have been gathered since rc8: fixes for HD-audio widget power control regressions since 4.1, a NULL fix for HD-audio HDMI, a noise fix for Conexant codecs and a quirk addition for USB-Audio DSD" * tag 'sound-fix-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix path power activation ALSA: hda - Check all inputs for is_active_nid_for_any() ALSA: hda: fix possible NULL dereference ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises ALSA: usb: Add native DSD support for Gustard DAC-X20U
This commit is contained in:
Коммит
b29083c5e5
|
@ -3172,7 +3172,7 @@ static int add_std_chmaps(struct hda_codec *codec)
|
|||
struct snd_pcm_chmap *chmap;
|
||||
const struct snd_pcm_chmap_elem *elem;
|
||||
|
||||
if (!pcm || pcm->own_chmap ||
|
||||
if (!pcm || !pcm->pcm || pcm->own_chmap ||
|
||||
!hinfo->substreams)
|
||||
continue;
|
||||
elem = hinfo->chmap ? hinfo->chmap : snd_pcm_std_chmaps;
|
||||
|
|
|
@ -671,7 +671,8 @@ static bool is_active_nid(struct hda_codec *codec, hda_nid_t nid,
|
|||
}
|
||||
for (i = 0; i < path->depth; i++) {
|
||||
if (path->path[i] == nid) {
|
||||
if (dir == HDA_OUTPUT || path->idx[i] == idx)
|
||||
if (dir == HDA_OUTPUT || idx == -1 ||
|
||||
path->idx[i] == idx)
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
@ -682,7 +683,7 @@ static bool is_active_nid(struct hda_codec *codec, hda_nid_t nid,
|
|||
|
||||
/* check whether the NID is referred by any active paths */
|
||||
#define is_active_nid_for_any(codec, nid) \
|
||||
is_active_nid(codec, nid, HDA_OUTPUT, 0)
|
||||
is_active_nid(codec, nid, HDA_OUTPUT, -1)
|
||||
|
||||
/* get the default amp value for the target state */
|
||||
static int get_amp_val_to_activate(struct hda_codec *codec, hda_nid_t nid,
|
||||
|
@ -883,8 +884,7 @@ void snd_hda_activate_path(struct hda_codec *codec, struct nid_path *path,
|
|||
struct hda_gen_spec *spec = codec->spec;
|
||||
int i;
|
||||
|
||||
if (!enable)
|
||||
path->active = false;
|
||||
path->active = enable;
|
||||
|
||||
/* make sure the widget is powered up */
|
||||
if (enable && (spec->power_down_unused || codec->power_save_node))
|
||||
|
@ -902,9 +902,6 @@ void snd_hda_activate_path(struct hda_codec *codec, struct nid_path *path,
|
|||
if (has_amp_out(codec, path, i))
|
||||
activate_amp_out(codec, path, i, enable);
|
||||
}
|
||||
|
||||
if (enable)
|
||||
path->active = true;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hda_activate_path);
|
||||
|
||||
|
|
|
@ -200,12 +200,33 @@ static int cx_auto_init(struct hda_codec *codec)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define cx_auto_free snd_hda_gen_free
|
||||
static void cx_auto_reboot_notify(struct hda_codec *codec)
|
||||
{
|
||||
struct conexant_spec *spec = codec->spec;
|
||||
|
||||
if (codec->core.vendor_id != 0x14f150f2)
|
||||
return;
|
||||
|
||||
/* Turn the CX20722 codec into D3 to avoid spurious noises
|
||||
from the internal speaker during (and after) reboot */
|
||||
cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
|
||||
|
||||
snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3);
|
||||
snd_hda_codec_write(codec, codec->core.afg, 0,
|
||||
AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
|
||||
}
|
||||
|
||||
static void cx_auto_free(struct hda_codec *codec)
|
||||
{
|
||||
cx_auto_reboot_notify(codec);
|
||||
snd_hda_gen_free(codec);
|
||||
}
|
||||
|
||||
static const struct hda_codec_ops cx_auto_patch_ops = {
|
||||
.build_controls = cx_auto_build_controls,
|
||||
.build_pcms = snd_hda_gen_build_pcms,
|
||||
.init = cx_auto_init,
|
||||
.reboot_notify = cx_auto_reboot_notify,
|
||||
.free = cx_auto_free,
|
||||
.unsol_event = snd_hda_jack_unsol_event,
|
||||
#ifdef CONFIG_PM
|
||||
|
|
|
@ -1268,6 +1268,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
|
|||
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
|
||||
break;
|
||||
|
||||
case USB_ID(0x20b1, 0x000a): /* Gustard DAC-X20U */
|
||||
case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
|
||||
case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
|
||||
if (fp->altsetting == 3)
|
||||
|
|
Загрузка…
Ссылка в новой задаче