Changeset 754
- Timestamp:
- Oct 22, 2022, 10:06:27 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-exp/alsa-kernel
- Files:
-
- 8 edited
-
core/rawmidi.c (modified) (1 diff)
-
core/sound_oss.c (modified) (2 diffs)
-
include/sound/version.h (modified) (1 diff)
-
pci/hda/hda_beep.h (modified) (1 diff)
-
pci/hda/hda_codec.c (modified) (2 diffs)
-
pci/hda/patch_hdmi.c (modified) (14 diffs)
-
pci/hda/patch_realtek.c (modified) (4 diffs)
-
pci/hda/patch_sigmatel.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/alsa-kernel/core/rawmidi.c
r750 r754 1929 1929 snd_info_free_entry(rmidi->proc_entry); 1930 1930 rmidi->proc_entry = NULL; 1931 mutex_lock(®ister_mutex);1932 1931 if (rmidi->ops && rmidi->ops->dev_unregister) 1933 1932 rmidi->ops->dev_unregister(rmidi); 1934 mutex_unlock(®ister_mutex);1935 1933 1936 1934 snd_rawmidi_free_substreams(&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT]); -
GPL/branches/uniaud32-exp/alsa-kernel/core/sound_oss.c
r697 r754 171 171 return -ENOENT; 172 172 } 173 unregister_sound_special(minor);174 173 switch (SNDRV_MINOR_OSS_DEVICE(minor)) { 175 174 case SNDRV_MINOR_OSS_PCM: … … 183 182 break; 184 183 } 185 if (track2 >= 0) { 184 if (track2 >= 0) 185 snd_oss_minors[track2] = NULL; 186 snd_oss_minors[minor] = NULL; 187 mutex_unlock(&sound_oss_mutex); 188 189 /* call unregister_sound_special() outside sound_oss_mutex; 190 * otherwise may deadlock, as it can trigger the release of a card 191 */ 192 unregister_sound_special(minor); 193 if (track2 >= 0) 186 194 unregister_sound_special(track2); 187 snd_oss_minors[track2] = NULL; 188 } 189 snd_oss_minors[minor] = NULL; 190 mutex_unlock(&sound_oss_mutex); 195 191 196 kfree(mptr); 192 197 return 0; -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/version.h
r751 r754 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "6.0. 2"2 #define CONFIG_SND_VERSION "6.0.3" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_beep.h
r615 r754 26 26 unsigned int linear_tone:1; /* linear tone for IDT/STAC codec */ 27 27 unsigned int playing:1; 28 unsigned int keep_power_at_enable:1; /* set by driver */ 28 29 struct work_struct beep_work; /* scheduled task for beep event */ 29 30 struct mutex mutex; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_codec.c
r750 r754 944 944 945 945 codec->bus = bus; 946 codec->core.type = HDA_DEV_LEGACY; 947 948 return codec; 949 } 950 EXPORT_SYMBOL_GPL(snd_hda_codec_device_init); 951 952 /** 953 * snd_hda_codec_new - create a HDA codec 954 * @bus: the bus to assign 955 * @card: card for this codec 956 * @codec_addr: the codec address 957 * @codecp: the pointer to store the generated codec 958 * 959 * Returns 0 if successful, or a negative error code. 960 */ 961 int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card, 962 unsigned int codec_addr, struct hda_codec **codecp) 963 { 964 struct hda_codec *codec; 965 int ret; 966 967 codec = snd_hda_codec_device_init(bus, codec_addr, "hdaudioC%dD%d", 968 card->number, codec_addr); 969 if (IS_ERR(codec)) 970 return PTR_ERR(codec); 971 *codecp = codec; 972 973 ret = snd_hda_codec_device_new(bus, card, codec_addr, *codecp, true); 974 if (ret) 975 put_device(hda_codec_dev(*codecp)); 976 977 return ret; 978 } 979 EXPORT_SYMBOL_GPL(snd_hda_codec_new); 980 981 int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card, 982 unsigned int codec_addr, struct hda_codec *codec, 983 bool snddev_managed) 984 { 985 char component[31]; 986 hda_nid_t fg; 987 int err; 988 static const struct snd_device_ops dev_ops = { 989 .dev_register = snd_hda_codec_dev_register, 990 .dev_free = snd_hda_codec_dev_free, 991 }; 992 993 dev_dbg(card->dev, "%s: entry\n", __func__); 994 995 if (snd_BUG_ON(!bus)) 996 return -EINVAL; 997 if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) 998 return -EINVAL; 999 946 codec->depop_delay = -1; 947 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; 1000 948 codec->core.dev.release = snd_hda_codec_dev_release; 1001 949 codec->core.exec_verb = codec_exec_verb; 1002 1003 codec->card = card; 1004 codec->addr = codec_addr; 950 codec->core.type = HDA_DEV_LEGACY; 951 1005 952 mutex_init(&codec->spdif_mutex); 1006 953 mutex_init(&codec->control_mutex); … … 1015 962 INIT_LIST_HEAD(&codec->conn_list); 1016 963 INIT_LIST_HEAD(&codec->pcm_list_head); 964 INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work); 1017 965 refcount_set(&codec->pcm_ref, 1); 1018 966 init_waitqueue_head(&codec->remove_sleep); 1019 967 1020 INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work); 1021 codec->depop_delay = -1; 1022 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; 968 return codec; 969 } 970 EXPORT_SYMBOL_GPL(snd_hda_codec_device_init); 971 972 /** 973 * snd_hda_codec_new - create a HDA codec 974 * @bus: the bus to assign 975 * @card: card for this codec 976 * @codec_addr: the codec address 977 * @codecp: the pointer to store the generated codec 978 * 979 * Returns 0 if successful, or a negative error code. 980 */ 981 int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card, 982 unsigned int codec_addr, struct hda_codec **codecp) 983 { 984 struct hda_codec *codec; 985 int ret; 986 987 codec = snd_hda_codec_device_init(bus, codec_addr, "hdaudioC%dD%d", 988 card->number, codec_addr); 989 if (IS_ERR(codec)) 990 return PTR_ERR(codec); 991 *codecp = codec; 992 993 ret = snd_hda_codec_device_new(bus, card, codec_addr, *codecp, true); 994 if (ret) 995 put_device(hda_codec_dev(*codecp)); 996 997 return ret; 998 } 999 EXPORT_SYMBOL_GPL(snd_hda_codec_new); 1000 1001 int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card, 1002 unsigned int codec_addr, struct hda_codec *codec, 1003 bool snddev_managed) 1004 { 1005 char component[31]; 1006 hda_nid_t fg; 1007 int err; 1008 static const struct snd_device_ops dev_ops = { 1009 .dev_register = snd_hda_codec_dev_register, 1010 .dev_free = snd_hda_codec_dev_free, 1011 }; 1012 1013 dev_dbg(card->dev, "%s: entry\n", __func__); 1014 1015 if (snd_BUG_ON(!bus)) 1016 return -EINVAL; 1017 if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) 1018 return -EINVAL; 1019 1020 codec->card = card; 1021 codec->addr = codec_addr; 1023 1022 1024 1023 #ifdef CONFIG_PM -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_hdmi.c
r750 r754 66 66 struct hdmi_spec_per_cvt { 67 67 hda_nid_t cvt_nid; 68 int assigned; 68 bool assigned; /* the stream has been assigned */ 69 bool silent_stream; /* silent stream activated */ 69 70 unsigned int channels_min; 70 71 unsigned int channels_max; … … 1001 1002 */ 1002 1003 static int hdmi_choose_cvt(struct hda_codec *codec, 1003 int pin_idx, int *cvt_id) 1004 int pin_idx, int *cvt_id, 1005 bool silent) 1004 1006 { 1005 1007 struct hdmi_spec *spec = codec->spec; … … 1016 1018 if (per_pin && per_pin->silent_stream) { 1017 1019 cvt_idx = cvt_nid_to_cvt_index(codec, per_pin->cvt_nid); 1020 per_cvt = get_cvt(spec, cvt_idx); 1021 if (per_cvt->assigned && !silent) 1022 return -EBUSY; 1018 1023 if (cvt_id) 1019 1024 *cvt_id = cvt_idx; … … 1026 1031 1027 1032 /* Must not already be assigned */ 1028 if (per_cvt->assigned )1033 if (per_cvt->assigned || per_cvt->silent_stream) 1029 1034 continue; 1030 1035 if (per_pin == NULL) … … 1212 1217 return -EINVAL; 1213 1218 1214 err = hdmi_choose_cvt(codec, -1, &cvt_idx );1219 err = hdmi_choose_cvt(codec, -1, &cvt_idx, false); 1215 1220 if (err) 1216 1221 return err; 1217 1222 1218 1223 per_cvt = get_cvt(spec, cvt_idx); 1219 per_cvt->assigned = 1;1224 per_cvt->assigned = true; 1220 1225 hinfo->nid = per_cvt->cvt_nid; 1221 1226 … … 1280 1285 } 1281 1286 1282 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx );1287 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx, false); 1283 1288 if (err < 0) 1284 1289 goto unlock; … … 1286 1291 per_cvt = get_cvt(spec, cvt_idx); 1287 1292 /* Claim converter */ 1288 per_cvt->assigned = 1;1293 per_cvt->assigned = true; 1289 1294 1290 1295 set_bit(pcm_idx, &spec->pcm_in_use); 1291 1296 per_pin = get_pin(spec, pin_idx); 1292 1297 per_pin->cvt_nid = per_cvt->cvt_nid; 1293 per_pin->silent_stream = false;1294 1298 hinfo->nid = per_cvt->cvt_nid; 1295 1299 … … 1321 1325 if (hinfo->channels_min > hinfo->channels_max || 1322 1326 !hinfo->rates || !hinfo->formats) { 1323 per_cvt->assigned = 0;1327 per_cvt->assigned = false; 1324 1328 hinfo->nid = 0; 1325 1329 snd_hda_spdif_ctls_unassign(codec, pcm_idx); … … 1773 1777 1774 1778 pin_idx = pin_id_to_pin_index(codec, per_pin->pin_nid, per_pin->dev_id); 1775 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx );1779 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx, true); 1776 1780 if (err) { 1777 1781 codec_err(codec, "hdmi: no free converter to enable silent mode\n"); … … 1780 1784 1781 1785 per_cvt = get_cvt(spec, cvt_idx); 1782 per_cvt-> assigned = 1;1786 per_cvt->silent_stream = true; 1783 1787 per_pin->cvt_nid = per_cvt->cvt_nid; 1784 1788 per_pin->silent_stream = true; … … 1840 1844 if (cvt_idx >= 0 && cvt_idx < spec->num_cvts) { 1841 1845 per_cvt = get_cvt(spec, cvt_idx); 1842 per_cvt-> assigned = 0;1846 per_cvt->silent_stream = false; 1843 1847 } 1844 1848 … … 2236 2240 } 2237 2241 per_cvt = get_cvt(spec, cvt_idx); 2238 per_cvt->assigned = 0;2242 per_cvt->assigned = false; 2239 2243 hinfo->nid = 0; 2240 2244 … … 2762 2766 return; 2763 2767 #endif 2764 /* ditto during suspend/resume process itself */2765 if (snd_hdac_is_in_pm(&codec->core))2766 return;2767 2768 2768 2769 check_presence_and_report(codec, pin_nid, dev_id); … … 2950 2951 return; 2951 2952 #endif 2952 /* ditto during suspend/resume process itself */2953 if (snd_hdac_is_in_pm(&codec->core))2954 return;2955 2953 2956 2954 snd_hdac_i915_set_bclk(&codec->bus->core); -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c
r751 r754 9452 9452 .type = HDA_FIXUP_PINS, 9453 9453 .v.pins = (const struct hda_pintbl[]) { 9454 { 0x14, 0x90170120 }, 9454 { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */ 9455 { 0x19, 0x03a19020 }, /* Mic Boost Volume */ 9456 { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */ 9457 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */ 9458 { 0x21, 0x03211420 }, 9455 9459 { } 9456 9460 }, 9457 .chained = true,9458 .chain_id = ALC294_FIXUP_ASUS_G513_PINS,9459 9461 }, 9460 9462 [ALC294_FIXUP_ASUS_COEF_1B] = { … … 10212 10214 SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC), 10213 10215 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB), 10214 SND_PCI_QUIRK(0x1028, 0x087d, "Dell Precision 5530", ALC289_FIXUP_DUAL_SPK),10215 10216 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE), 10216 10217 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE), … … 10436 10437 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), 10437 10438 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), 10439 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), 10438 10440 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), 10439 10441 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), … … 10457 10459 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), 10458 10460 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10461 SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10459 10462 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 10460 10463 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_sigmatel.c
r749 r754 4414 4414 /* IDT/STAC codecs have linear beep tone parameter */ 4415 4415 codec->beep->linear_tone = spec->linear_tone_beep; 4416 /* keep power up while beep is enabled */ 4417 codec->beep->keep_power_at_enable = 1; 4416 4418 /* if no beep switch is available, make its own one */ 4417 4419 caps = query_amp_caps(codec, nid, HDA_OUTPUT); … … 4546 4548 return 0; 4547 4549 } 4548 4549 static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid)4550 {4551 #ifdef CONFIG_SND_HDA_INPUT_BEEP4552 struct sigmatel_spec *spec = codec->spec;4553 #endif4554 int ret = snd_hda_gen_check_power_status(codec, nid);4555 4556 #ifdef CONFIG_SND_HDA_INPUT_BEEP4557 if (nid == spec->gen.beep_nid && codec->beep) {4558 if (codec->beep->enabled != spec->beep_power_on) {4559 spec->beep_power_on = codec->beep->enabled;4560 if (spec->beep_power_on)4561 snd_hda_power_up_pm(codec);4562 else4563 snd_hda_power_down_pm(codec);4564 }4565 ret |= spec->beep_power_on;4566 }4567 #endif4568 return ret;4569 }4570 4550 #else 4571 4551 #define stac_suspend NULL … … 4580 4560 #ifdef CONFIG_PM 4581 4561 .suspend = stac_suspend, 4582 .check_power_status = stac_check_power_status,4583 4562 #endif 4584 4563 };
Note:
See TracChangeset
for help on using the changeset viewer.
