Loading include/sound/core.h +2 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ static inline int __snd_bug_on(int cond) #define gameport_get_port_data(gp) (gp)->port_data #endif #ifdef CONFIG_PCI /* PCI quirk list helper */ struct snd_pci_quirk { unsigned short subvendor; /* PCI subvendor ID */ Loading Loading @@ -456,5 +457,6 @@ snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list); const struct snd_pci_quirk * snd_pci_quirk_lookup_id(u16 vendor, u16 device, const struct snd_pci_quirk *list); #endif #endif /* __SOUND_CORE_H */ sound/core/compress_offload.c +8 −5 Original line number Diff line number Diff line Loading @@ -441,19 +441,22 @@ snd_compr_set_params(struct snd_compr_stream *stream, unsigned long arg) params = kmalloc(sizeof(*params), GFP_KERNEL); if (!params) return -ENOMEM; if (copy_from_user(params, (void __user *)arg, sizeof(*params))) return -EFAULT; if (copy_from_user(params, (void __user *)arg, sizeof(*params))) { retval = -EFAULT; goto out; } retval = snd_compr_allocate_buffer(stream, params); if (retval) { kfree(params); return -ENOMEM; retval = -ENOMEM; goto out; } retval = stream->ops->set_params(stream, params); if (retval) goto out; stream->runtime->state = SNDRV_PCM_STATE_SETUP; } else } else { return -EPERM; } out: kfree(params); return retval; Loading sound/pci/hda/hda_codec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1447,7 +1447,7 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, for (i = 0; i < c->cvt_setups.used; i++) { p = snd_array_elem(&c->cvt_setups, i); if (!p->active && p->stream_tag == stream_tag && get_wcaps_type(get_wcaps(codec, p->nid)) == type) get_wcaps_type(get_wcaps(c, p->nid)) == type) p->dirty = 1; } } Loading sound/pci/hda/hda_jack.c +15 −9 Original line number Diff line number Diff line Loading @@ -282,7 +282,8 @@ int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid, EXPORT_SYMBOL_HDA(snd_hda_jack_add_kctl); static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid, const struct auto_pin_cfg *cfg) const struct auto_pin_cfg *cfg, char *lastname, int *lastidx) { unsigned int def_conf, conn; char name[44]; Loading @@ -298,6 +299,10 @@ static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid, return 0; snd_hda_get_pin_label(codec, nid, cfg, name, sizeof(name), &idx); if (!strcmp(name, lastname) && idx == *lastidx) idx++; strncpy(lastname, name, 44); *lastidx = idx; err = snd_hda_jack_add_kctl(codec, nid, name, idx); if (err < 0) return err; Loading @@ -311,41 +316,42 @@ int snd_hda_jack_add_kctls(struct hda_codec *codec, const struct auto_pin_cfg *cfg) { const hda_nid_t *p; int i, err; int i, err, lastidx = 0; char lastname[44] = ""; for (i = 0, p = cfg->line_out_pins; i < cfg->line_outs; i++, p++) { err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0, p = cfg->hp_pins; i < cfg->hp_outs; i++, p++) { if (*p == *cfg->line_out_pins) /* might be duplicated */ break; err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0, p = cfg->speaker_pins; i < cfg->speaker_outs; i++, p++) { if (*p == *cfg->line_out_pins) /* might be duplicated */ break; err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0; i < cfg->num_inputs; i++) { err = add_jack_kctl(codec, cfg->inputs[i].pin, cfg); err = add_jack_kctl(codec, cfg->inputs[i].pin, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0, p = cfg->dig_out_pins; i < cfg->dig_outs; i++, p++) { err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } err = add_jack_kctl(codec, cfg->dig_in_pin, cfg); err = add_jack_kctl(codec, cfg->dig_in_pin, cfg, lastname, &lastidx); if (err < 0) return err; err = add_jack_kctl(codec, cfg->mono_out_pin, cfg); err = add_jack_kctl(codec, cfg->mono_out_pin, cfg, lastname, &lastidx); if (err < 0) return err; return 0; Loading sound/pci/hda/patch_cirrus.c +4 −2 Original line number Diff line number Diff line Loading @@ -988,8 +988,10 @@ static void cs_automic(struct hda_codec *codec) change_cur_input(codec, !spec->automic_idx, 0); } else { if (present) { if (spec->cur_input != spec->automic_idx) { spec->last_input = spec->cur_input; spec->cur_input = spec->automic_idx; } } else { spec->cur_input = spec->last_input; } Loading Loading
include/sound/core.h +2 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ static inline int __snd_bug_on(int cond) #define gameport_get_port_data(gp) (gp)->port_data #endif #ifdef CONFIG_PCI /* PCI quirk list helper */ struct snd_pci_quirk { unsigned short subvendor; /* PCI subvendor ID */ Loading Loading @@ -456,5 +457,6 @@ snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list); const struct snd_pci_quirk * snd_pci_quirk_lookup_id(u16 vendor, u16 device, const struct snd_pci_quirk *list); #endif #endif /* __SOUND_CORE_H */
sound/core/compress_offload.c +8 −5 Original line number Diff line number Diff line Loading @@ -441,19 +441,22 @@ snd_compr_set_params(struct snd_compr_stream *stream, unsigned long arg) params = kmalloc(sizeof(*params), GFP_KERNEL); if (!params) return -ENOMEM; if (copy_from_user(params, (void __user *)arg, sizeof(*params))) return -EFAULT; if (copy_from_user(params, (void __user *)arg, sizeof(*params))) { retval = -EFAULT; goto out; } retval = snd_compr_allocate_buffer(stream, params); if (retval) { kfree(params); return -ENOMEM; retval = -ENOMEM; goto out; } retval = stream->ops->set_params(stream, params); if (retval) goto out; stream->runtime->state = SNDRV_PCM_STATE_SETUP; } else } else { return -EPERM; } out: kfree(params); return retval; Loading
sound/pci/hda/hda_codec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1447,7 +1447,7 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, for (i = 0; i < c->cvt_setups.used; i++) { p = snd_array_elem(&c->cvt_setups, i); if (!p->active && p->stream_tag == stream_tag && get_wcaps_type(get_wcaps(codec, p->nid)) == type) get_wcaps_type(get_wcaps(c, p->nid)) == type) p->dirty = 1; } } Loading
sound/pci/hda/hda_jack.c +15 −9 Original line number Diff line number Diff line Loading @@ -282,7 +282,8 @@ int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid, EXPORT_SYMBOL_HDA(snd_hda_jack_add_kctl); static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid, const struct auto_pin_cfg *cfg) const struct auto_pin_cfg *cfg, char *lastname, int *lastidx) { unsigned int def_conf, conn; char name[44]; Loading @@ -298,6 +299,10 @@ static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid, return 0; snd_hda_get_pin_label(codec, nid, cfg, name, sizeof(name), &idx); if (!strcmp(name, lastname) && idx == *lastidx) idx++; strncpy(lastname, name, 44); *lastidx = idx; err = snd_hda_jack_add_kctl(codec, nid, name, idx); if (err < 0) return err; Loading @@ -311,41 +316,42 @@ int snd_hda_jack_add_kctls(struct hda_codec *codec, const struct auto_pin_cfg *cfg) { const hda_nid_t *p; int i, err; int i, err, lastidx = 0; char lastname[44] = ""; for (i = 0, p = cfg->line_out_pins; i < cfg->line_outs; i++, p++) { err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0, p = cfg->hp_pins; i < cfg->hp_outs; i++, p++) { if (*p == *cfg->line_out_pins) /* might be duplicated */ break; err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0, p = cfg->speaker_pins; i < cfg->speaker_outs; i++, p++) { if (*p == *cfg->line_out_pins) /* might be duplicated */ break; err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0; i < cfg->num_inputs; i++) { err = add_jack_kctl(codec, cfg->inputs[i].pin, cfg); err = add_jack_kctl(codec, cfg->inputs[i].pin, cfg, lastname, &lastidx); if (err < 0) return err; } for (i = 0, p = cfg->dig_out_pins; i < cfg->dig_outs; i++, p++) { err = add_jack_kctl(codec, *p, cfg); err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx); if (err < 0) return err; } err = add_jack_kctl(codec, cfg->dig_in_pin, cfg); err = add_jack_kctl(codec, cfg->dig_in_pin, cfg, lastname, &lastidx); if (err < 0) return err; err = add_jack_kctl(codec, cfg->mono_out_pin, cfg); err = add_jack_kctl(codec, cfg->mono_out_pin, cfg, lastname, &lastidx); if (err < 0) return err; return 0; Loading
sound/pci/hda/patch_cirrus.c +4 −2 Original line number Diff line number Diff line Loading @@ -988,8 +988,10 @@ static void cs_automic(struct hda_codec *codec) change_cur_input(codec, !spec->automic_idx, 0); } else { if (present) { if (spec->cur_input != spec->automic_idx) { spec->last_input = spec->cur_input; spec->cur_input = spec->automic_idx; } } else { spec->cur_input = spec->last_input; } Loading