mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge branch 'for-linus' into for-next
Merge for 5.18-rc1 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -679,6 +679,7 @@ EXPORT_SYMBOL_GPL(fw_card_release);
|
||||
void fw_core_remove_card(struct fw_card *card)
|
||||
{
|
||||
struct fw_card_driver dummy_driver = dummy_driver_template;
|
||||
unsigned long flags;
|
||||
|
||||
card->driver->update_phy_reg(card, 4,
|
||||
PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
|
||||
@@ -693,7 +694,9 @@ void fw_core_remove_card(struct fw_card *card)
|
||||
dummy_driver.stop_iso = card->driver->stop_iso;
|
||||
card->driver = &dummy_driver;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
fw_destroy_nodes(card);
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
|
||||
/* Wait for all users, especially device workqueue jobs, to finish. */
|
||||
fw_card_put(card);
|
||||
|
||||
@@ -1502,6 +1502,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
|
||||
{
|
||||
struct outbound_phy_packet_event *e =
|
||||
container_of(packet, struct outbound_phy_packet_event, p);
|
||||
struct client *e_client;
|
||||
|
||||
switch (status) {
|
||||
/* expected: */
|
||||
@@ -1518,9 +1519,10 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
|
||||
}
|
||||
e->phy_packet.data[0] = packet->timestamp;
|
||||
|
||||
e_client = e->client;
|
||||
queue_event(e->client, &e->event, &e->phy_packet,
|
||||
sizeof(e->phy_packet) + e->phy_packet.length, NULL, 0);
|
||||
client_put(e->client);
|
||||
client_put(e_client);
|
||||
}
|
||||
|
||||
static int ioctl_send_phy_packet(struct client *client, union ioctl_arg *arg)
|
||||
|
||||
@@ -375,16 +375,13 @@ static void report_found_node(struct fw_card *card,
|
||||
card->bm_retries = 0;
|
||||
}
|
||||
|
||||
/* Must be called with card->lock held */
|
||||
void fw_destroy_nodes(struct fw_card *card)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
card->color++;
|
||||
if (card->local_node != NULL)
|
||||
for_each_fw_node(card, card->local_node, report_lost_node);
|
||||
card->local_node = NULL;
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
}
|
||||
|
||||
static void move_tree(struct fw_node *node0, struct fw_node *node1, int port)
|
||||
@@ -510,6 +507,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
|
||||
struct fw_node *local_node;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
|
||||
/*
|
||||
* If the selfID buffer is not the immediate successor of the
|
||||
* previously processed one, we cannot reliably compare the
|
||||
@@ -521,8 +520,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
|
||||
card->bm_retries = 0;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
|
||||
card->broadcast_channel_allocated = card->broadcast_channel_auto_allocated;
|
||||
card->node_id = node_id;
|
||||
/*
|
||||
|
||||
@@ -73,24 +73,25 @@ static int try_cancel_split_timeout(struct fw_transaction *t)
|
||||
static int close_transaction(struct fw_transaction *transaction,
|
||||
struct fw_card *card, int rcode)
|
||||
{
|
||||
struct fw_transaction *t;
|
||||
struct fw_transaction *t = NULL, *iter;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
list_for_each_entry(t, &card->transaction_list, link) {
|
||||
if (t == transaction) {
|
||||
if (!try_cancel_split_timeout(t)) {
|
||||
list_for_each_entry(iter, &card->transaction_list, link) {
|
||||
if (iter == transaction) {
|
||||
if (!try_cancel_split_timeout(iter)) {
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
goto timed_out;
|
||||
}
|
||||
list_del_init(&t->link);
|
||||
card->tlabel_mask &= ~(1ULL << t->tlabel);
|
||||
list_del_init(&iter->link);
|
||||
card->tlabel_mask &= ~(1ULL << iter->tlabel);
|
||||
t = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
|
||||
if (&t->link != &card->transaction_list) {
|
||||
if (t) {
|
||||
t->callback(card, rcode, NULL, 0, t->callback_data);
|
||||
return 0;
|
||||
}
|
||||
@@ -953,7 +954,7 @@ EXPORT_SYMBOL(fw_core_handle_request);
|
||||
|
||||
void fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
|
||||
{
|
||||
struct fw_transaction *t;
|
||||
struct fw_transaction *t = NULL, *iter;
|
||||
unsigned long flags;
|
||||
u32 *data;
|
||||
size_t data_length;
|
||||
@@ -965,20 +966,21 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
|
||||
rcode = HEADER_GET_RCODE(p->header[1]);
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
list_for_each_entry(t, &card->transaction_list, link) {
|
||||
if (t->node_id == source && t->tlabel == tlabel) {
|
||||
if (!try_cancel_split_timeout(t)) {
|
||||
list_for_each_entry(iter, &card->transaction_list, link) {
|
||||
if (iter->node_id == source && iter->tlabel == tlabel) {
|
||||
if (!try_cancel_split_timeout(iter)) {
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
goto timed_out;
|
||||
}
|
||||
list_del_init(&t->link);
|
||||
card->tlabel_mask &= ~(1ULL << t->tlabel);
|
||||
list_del_init(&iter->link);
|
||||
card->tlabel_mask &= ~(1ULL << iter->tlabel);
|
||||
t = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
|
||||
if (&t->link == &card->transaction_list) {
|
||||
if (!t) {
|
||||
timed_out:
|
||||
fw_notice(card, "unsolicited response (source %x, tlabel %x)\n",
|
||||
source, tlabel);
|
||||
|
||||
@@ -408,7 +408,7 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
|
||||
void *payload, size_t length, void *callback_data)
|
||||
{
|
||||
struct sbp2_logical_unit *lu = callback_data;
|
||||
struct sbp2_orb *orb;
|
||||
struct sbp2_orb *orb = NULL, *iter;
|
||||
struct sbp2_status status;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -433,17 +433,18 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
|
||||
|
||||
/* Lookup the orb corresponding to this status write. */
|
||||
spin_lock_irqsave(&lu->tgt->lock, flags);
|
||||
list_for_each_entry(orb, &lu->orb_list, link) {
|
||||
list_for_each_entry(iter, &lu->orb_list, link) {
|
||||
if (STATUS_GET_ORB_HIGH(status) == 0 &&
|
||||
STATUS_GET_ORB_LOW(status) == orb->request_bus) {
|
||||
orb->rcode = RCODE_COMPLETE;
|
||||
list_del(&orb->link);
|
||||
STATUS_GET_ORB_LOW(status) == iter->request_bus) {
|
||||
iter->rcode = RCODE_COMPLETE;
|
||||
list_del(&iter->link);
|
||||
orb = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&lu->tgt->lock, flags);
|
||||
|
||||
if (&orb->link != &lu->orb_list) {
|
||||
if (orb) {
|
||||
orb->callback(orb, &status);
|
||||
kref_put(&orb->kref, free_orb); /* orb callback reference */
|
||||
} else {
|
||||
|
||||
@@ -955,8 +955,7 @@ static int cs_dsp_create_control(struct cs_dsp *dsp,
|
||||
ctl->alg_region = *alg_region;
|
||||
if (subname && dsp->fw_ver >= 2) {
|
||||
ctl->subname_len = subname_len;
|
||||
ctl->subname = kmemdup(subname,
|
||||
strlen(subname) + 1, GFP_KERNEL);
|
||||
ctl->subname = kasprintf(GFP_KERNEL, "%.*s", subname_len, subname);
|
||||
if (!ctl->subname) {
|
||||
ret = -ENOMEM;
|
||||
goto err_ctl;
|
||||
|
||||
@@ -179,6 +179,10 @@ struct snd_soc_component_driver {
|
||||
struct snd_pcm_hw_params *params);
|
||||
bool use_dai_pcm_id; /* use DAI link PCM ID as PCM device number */
|
||||
int be_pcm_base; /* base device ID for all BE PCMs */
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
const char *debugfs_prefix;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct snd_soc_component {
|
||||
|
||||
@@ -34,6 +34,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained,
|
||||
type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE;
|
||||
if (copy_to_user(buf, &type, sizeof(type)))
|
||||
return -EFAULT;
|
||||
count += sizeof(type);
|
||||
remained -= sizeof(type);
|
||||
buf += sizeof(type);
|
||||
|
||||
|
||||
@@ -127,11 +127,10 @@ static int i915_gfx_present(struct pci_dev *hdac_pci)
|
||||
display_dev = pci_get_class(class, display_dev);
|
||||
|
||||
if (display_dev && display_dev->vendor == PCI_VENDOR_ID_INTEL &&
|
||||
connectivity_check(display_dev, hdac_pci))
|
||||
connectivity_check(display_dev, hdac_pci)) {
|
||||
pci_dev_put(display_dev);
|
||||
match = true;
|
||||
|
||||
pci_dev_put(display_dev);
|
||||
|
||||
}
|
||||
} while (!match && display_dev);
|
||||
|
||||
return match;
|
||||
|
||||
@@ -424,6 +424,15 @@ static const struct config_entry config_table[] = {
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x54c8,
|
||||
},
|
||||
/* RaptorLake-P */
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x51ca,
|
||||
},
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x51cb,
|
||||
},
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -1094,7 +1094,8 @@ wavefront_send_sample (snd_wavefront_t *dev,
|
||||
|
||||
if (dataptr < data_end) {
|
||||
|
||||
__get_user (sample_short, dataptr);
|
||||
if (get_user(sample_short, dataptr))
|
||||
return -EFAULT;
|
||||
dataptr += skip;
|
||||
|
||||
if (data_is_unsigned) { /* GUS ? */
|
||||
|
||||
@@ -1428,7 +1428,7 @@ void dmasound_deinit(void)
|
||||
unregister_sound_dsp(sq_unit);
|
||||
}
|
||||
|
||||
static int dmasound_setup(char *str)
|
||||
static int __maybe_unused dmasound_setup(char *str)
|
||||
{
|
||||
int ints[6], size;
|
||||
|
||||
|
||||
@@ -1395,7 +1395,7 @@ static int hdmi_find_pcm_slot(struct hdmi_spec *spec,
|
||||
|
||||
last_try:
|
||||
/* the last try; check the empty slots in pins */
|
||||
for (i = 0; i < spec->num_nids; i++) {
|
||||
for (i = 0; i < spec->pcm_used; i++) {
|
||||
if (!test_bit(i, &spec->pcm_bitmap))
|
||||
return i;
|
||||
}
|
||||
@@ -2325,7 +2325,9 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
|
||||
* dev_num is the device entry number in a pin
|
||||
*/
|
||||
|
||||
if (codec->mst_no_extra_pcms)
|
||||
if (spec->dyn_pcm_no_legacy && codec->mst_no_extra_pcms)
|
||||
pcm_num = spec->num_cvts;
|
||||
else if (codec->mst_no_extra_pcms)
|
||||
pcm_num = spec->num_nids;
|
||||
else
|
||||
pcm_num = spec->num_nids + spec->dev_num - 1;
|
||||
@@ -4551,6 +4553,7 @@ HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_adlp_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_adlp_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281f, "Raptorlake-P HDMI", patch_i915_adlp_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi),
|
||||
|
||||
@@ -937,6 +937,9 @@ static int alc_init(struct hda_codec *codec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define alc_free snd_hda_gen_free
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static inline void alc_shutup(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
@@ -950,9 +953,6 @@ static inline void alc_shutup(struct hda_codec *codec)
|
||||
alc_shutup_pins(codec);
|
||||
}
|
||||
|
||||
#define alc_free snd_hda_gen_free
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static void alc_power_eapd(struct hda_codec *codec)
|
||||
{
|
||||
alc_auto_setup_eapd(codec, false);
|
||||
@@ -966,9 +966,7 @@ static int alc_suspend(struct hda_codec *codec)
|
||||
spec->power_hook(codec);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int alc_resume(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
@@ -6728,6 +6726,41 @@ static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
|
||||
}
|
||||
}
|
||||
|
||||
static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix,
|
||||
int action)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
struct hda_input_mux *imux = &spec->gen.input_mux;
|
||||
int i;
|
||||
|
||||
alc269_fixup_limit_int_mic_boost(codec, fix, action);
|
||||
|
||||
switch (action) {
|
||||
case HDA_FIXUP_ACT_PRE_PROBE:
|
||||
/**
|
||||
* Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic)
|
||||
* to Hi-Z to avoid pop noises at startup and when plugging and
|
||||
* unplugging headphones.
|
||||
*/
|
||||
snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
|
||||
snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ);
|
||||
break;
|
||||
case HDA_FIXUP_ACT_PROBE:
|
||||
/**
|
||||
* Make the internal mic (0x12) the default input source to
|
||||
* prevent pop noises on cold boot.
|
||||
*/
|
||||
for (i = 0; i < imux->num_items; i++) {
|
||||
if (spec->gen.imux_pins[i] == 0x12) {
|
||||
spec->gen.cur_mux[0] = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
enum {
|
||||
ALC269_FIXUP_GPIO2,
|
||||
ALC269_FIXUP_SONY_VAIO,
|
||||
@@ -6769,6 +6802,7 @@ enum {
|
||||
ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
|
||||
ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
|
||||
ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
|
||||
ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
|
||||
ALC269_FIXUP_HEADSET_MODE,
|
||||
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
|
||||
ALC269_FIXUP_ASPIRE_HEADSET_MIC,
|
||||
@@ -6954,11 +6988,13 @@ enum {
|
||||
ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
|
||||
ALC287_FIXUP_LEGION_16ACHG6,
|
||||
ALC287_FIXUP_CS35L41_I2C_2,
|
||||
ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED,
|
||||
ALC245_FIXUP_CS35L41_SPI_2,
|
||||
ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED,
|
||||
ALC245_FIXUP_CS35L41_SPI_4,
|
||||
ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED,
|
||||
ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
|
||||
ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE,
|
||||
};
|
||||
|
||||
static const struct hda_fixup alc269_fixups[] = {
|
||||
@@ -8716,6 +8752,14 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
[ALC287_FIXUP_CS35L41_I2C_2] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = cs35l41_fixup_i2c_two,
|
||||
.chained = true,
|
||||
.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
|
||||
},
|
||||
[ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = cs35l41_fixup_i2c_two,
|
||||
.chained = true,
|
||||
.chain_id = ALC285_FIXUP_HP_MUTE_LED,
|
||||
},
|
||||
[ALC245_FIXUP_CS35L41_SPI_2] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
@@ -8747,6 +8791,21 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.chained = true,
|
||||
.chain_id = ALC285_FIXUP_HP_MUTE_LED,
|
||||
},
|
||||
[ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc_fixup_dell4_mic_no_presence_quiet,
|
||||
.chained = true,
|
||||
.chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
|
||||
},
|
||||
[ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
{ 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */
|
||||
{ }
|
||||
},
|
||||
.chained = true,
|
||||
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
@@ -8837,6 +8896,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
|
||||
@@ -8964,21 +9024,22 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
|
||||
SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
|
||||
SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
|
||||
@@ -9111,6 +9172,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC),
|
||||
SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME),
|
||||
@@ -9185,6 +9247,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
|
||||
@@ -9227,6 +9290,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
|
||||
SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
|
||||
SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS),
|
||||
SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||
SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
|
||||
@@ -9234,6 +9305,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
|
||||
SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
|
||||
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
|
||||
SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
|
||||
|
||||
#if 0
|
||||
/* Below is a quirk table taken from the old code.
|
||||
|
||||
@@ -561,8 +561,9 @@ static snd_pcm_uframes_t lola_pcm_pointer(struct snd_pcm_substream *substream)
|
||||
void lola_pcm_update(struct lola *chip, struct lola_pcm *pcm, unsigned int bits)
|
||||
{
|
||||
int i;
|
||||
u8 num_streams = min_t(u8, pcm->num_streams, ARRAY_SIZE(pcm->streams));
|
||||
|
||||
for (i = 0; bits && i < pcm->num_streams; i++) {
|
||||
for (i = 0; bits && i < num_streams; i++) {
|
||||
if (bits & (1 << i)) {
|
||||
struct lola_stream *str = &pcm->streams[i];
|
||||
if (str->substream && str->running)
|
||||
|
||||
@@ -966,6 +966,7 @@ static int mchp_pdmc_process(struct snd_pcm_substream *substream,
|
||||
|
||||
static struct snd_dmaengine_pcm_config mchp_pdmc_config = {
|
||||
.process = mchp_pdmc_process,
|
||||
.prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config,
|
||||
};
|
||||
|
||||
static int mchp_pdmc_probe(struct platform_device *pdev)
|
||||
|
||||
@@ -46,35 +46,6 @@
|
||||
*/
|
||||
#undef ENABLE_MIC_INPUT
|
||||
|
||||
static struct clk *mclk;
|
||||
|
||||
static int at91sam9g20ek_set_bias_level(struct snd_soc_card *card,
|
||||
struct snd_soc_dapm_context *dapm,
|
||||
enum snd_soc_bias_level level)
|
||||
{
|
||||
static int mclk_on;
|
||||
int ret = 0;
|
||||
|
||||
switch (level) {
|
||||
case SND_SOC_BIAS_ON:
|
||||
case SND_SOC_BIAS_PREPARE:
|
||||
if (!mclk_on)
|
||||
ret = clk_enable(mclk);
|
||||
if (ret == 0)
|
||||
mclk_on = 1;
|
||||
break;
|
||||
|
||||
case SND_SOC_BIAS_OFF:
|
||||
case SND_SOC_BIAS_STANDBY:
|
||||
if (mclk_on)
|
||||
clk_disable(mclk);
|
||||
mclk_on = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dapm_widget at91sam9g20ek_dapm_widgets[] = {
|
||||
SND_SOC_DAPM_MIC("Int Mic", NULL),
|
||||
SND_SOC_DAPM_SPK("Ext Spk", NULL),
|
||||
@@ -135,7 +106,6 @@ static struct snd_soc_card snd_soc_at91sam9g20ek = {
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = &at91sam9g20ek_dai,
|
||||
.num_links = 1,
|
||||
.set_bias_level = at91sam9g20ek_set_bias_level,
|
||||
|
||||
.dapm_widgets = at91sam9g20ek_dapm_widgets,
|
||||
.num_dapm_widgets = ARRAY_SIZE(at91sam9g20ek_dapm_widgets),
|
||||
@@ -148,7 +118,6 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *codec_np, *cpu_np;
|
||||
struct clk *pllb;
|
||||
struct snd_soc_card *card = &snd_soc_at91sam9g20ek;
|
||||
int ret;
|
||||
|
||||
@@ -162,31 +131,6 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Codec MCLK is supplied by PCK0 - set it up.
|
||||
*/
|
||||
mclk = clk_get(NULL, "pck0");
|
||||
if (IS_ERR(mclk)) {
|
||||
dev_err(&pdev->dev, "Failed to get MCLK\n");
|
||||
ret = PTR_ERR(mclk);
|
||||
goto err;
|
||||
}
|
||||
|
||||
pllb = clk_get(NULL, "pllb");
|
||||
if (IS_ERR(pllb)) {
|
||||
dev_err(&pdev->dev, "Failed to get PLLB\n");
|
||||
ret = PTR_ERR(pllb);
|
||||
goto err_mclk;
|
||||
}
|
||||
ret = clk_set_parent(mclk, pllb);
|
||||
clk_put(pllb);
|
||||
if (ret != 0) {
|
||||
dev_err(&pdev->dev, "Failed to set MCLK parent\n");
|
||||
goto err_mclk;
|
||||
}
|
||||
|
||||
clk_set_rate(mclk, MCLK_RATE);
|
||||
|
||||
card->dev = &pdev->dev;
|
||||
|
||||
/* Parse device node info */
|
||||
@@ -230,9 +174,6 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
|
||||
|
||||
return ret;
|
||||
|
||||
err_mclk:
|
||||
clk_put(mclk);
|
||||
mclk = NULL;
|
||||
err:
|
||||
atmel_ssc_put_audio(0);
|
||||
return ret;
|
||||
@@ -242,8 +183,6 @@ static int at91sam9g20ek_audio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
|
||||
clk_disable(mclk);
|
||||
mclk = NULL;
|
||||
snd_soc_unregister_card(card);
|
||||
atmel_ssc_put_audio(0);
|
||||
|
||||
|
||||
@@ -842,8 +842,8 @@ int cs35l41_otp_unpack(struct device *dev, struct regmap *regmap)
|
||||
word_offset = otp_map_match->word_offset;
|
||||
|
||||
for (i = 0; i < otp_map_match->num_elements; i++) {
|
||||
dev_dbg(dev, "bitoffset= %d, word_offset=%d, bit_sum mod 32=%d\n",
|
||||
bit_offset, word_offset, bit_sum % 32);
|
||||
dev_dbg(dev, "bitoffset= %d, word_offset=%d, bit_sum mod 32=%d otp_map[i].size = %d\n",
|
||||
bit_offset, word_offset, bit_sum % 32, otp_map[i].size);
|
||||
if (bit_offset + otp_map[i].size - 1 >= 32) {
|
||||
otp_val = (otp_mem[word_offset] &
|
||||
GENMASK(31, bit_offset)) >> bit_offset;
|
||||
@@ -851,12 +851,14 @@ int cs35l41_otp_unpack(struct device *dev, struct regmap *regmap)
|
||||
GENMASK(bit_offset + otp_map[i].size - 33, 0)) <<
|
||||
(32 - bit_offset);
|
||||
bit_offset += otp_map[i].size - 32;
|
||||
} else {
|
||||
} else if (bit_offset + otp_map[i].size - 1 >= 0) {
|
||||
otp_val = (otp_mem[word_offset] &
|
||||
GENMASK(bit_offset + otp_map[i].size - 1, bit_offset)
|
||||
) >> bit_offset;
|
||||
bit_offset += otp_map[i].size;
|
||||
}
|
||||
} else /* both bit_offset and otp_map[i].size are 0 */
|
||||
otp_val = 0;
|
||||
|
||||
bit_sum += otp_map[i].size;
|
||||
|
||||
if (bit_offset == 32) {
|
||||
|
||||
@@ -446,7 +446,7 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
|
||||
struct soc_mixer_control *mixer_ctrl =
|
||||
(struct soc_mixer_control *) kcontrol->private_value;
|
||||
unsigned int reg = mixer_ctrl->reg;
|
||||
__le16 val;
|
||||
__le16 val_new, val_old;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
@@ -454,13 +454,19 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
|
||||
* Therefore we need to convert to little endian here to align with
|
||||
* HW registers.
|
||||
*/
|
||||
val = cpu_to_le16(ucontrol->value.integer.value[0]);
|
||||
val_new = cpu_to_le16(ucontrol->value.integer.value[0]);
|
||||
|
||||
mutex_lock(&da7219->ctrl_lock);
|
||||
ret = regmap_raw_write(da7219->regmap, reg, &val, sizeof(val));
|
||||
ret = regmap_raw_read(da7219->regmap, reg, &val_old, sizeof(val_old));
|
||||
if (ret == 0 && (val_old != val_new))
|
||||
ret = regmap_raw_write(da7219->regmap, reg,
|
||||
&val_new, sizeof(val_new));
|
||||
mutex_unlock(&da7219->ctrl_lock);
|
||||
|
||||
return ret;
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return val_old != val_new;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3566,12 +3566,16 @@ static int rx_macro_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(rx->pds);
|
||||
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
if (IS_ERR(base)) {
|
||||
ret = PTR_ERR(base);
|
||||
goto err;
|
||||
}
|
||||
|
||||
rx->regmap = devm_regmap_init_mmio(dev, base, &rx_regmap_config);
|
||||
if (IS_ERR(rx->regmap))
|
||||
return PTR_ERR(rx->regmap);
|
||||
if (IS_ERR(rx->regmap)) {
|
||||
ret = PTR_ERR(rx->regmap);
|
||||
goto err;
|
||||
}
|
||||
|
||||
dev_set_drvdata(dev, rx);
|
||||
|
||||
@@ -3632,6 +3636,8 @@ err_mclk:
|
||||
err_dcodec:
|
||||
clk_disable_unprepare(rx->macro);
|
||||
err:
|
||||
lpass_macro_pds_exit(rx->pds);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user