Skip to content

Commit

Permalink
Merge tag 'sound-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This became bigger than usual, as it receives a pile of pending ASoC
  fixes. Most of changes are for device-specific issues while there are
  a few core fixes that are all rather trivial:

   - DMA-engine sync fixes

   - Continued MIDI2 conversion fixes

   - Various ASoC Intel SOF fixes

   - A series of ASoC topology fixes for memory handling

   - AMD ACP fix, curing a recent regression, too

   - Platform / codec-specific fixes for mediatek, atmel, realtek, etc"

* tag 'sound-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (40 commits)
  ASoC: rt5645: fix issue of random interrupt from push-button
  ALSA: seq: Fix missing MSB in MIDI2 SPP conversion
  ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA
  ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook 645/665 G11.
  ALSA: hda/realtek: Fix conflicting quirk for PCI SSID 17aa:3820
  ALSA: dmaengine_pcm: terminate dmaengine before synchronize
  ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx
  ALSA: PCM: Allow resume only for suspended streams
  ALSA: seq: Fix missing channel at encoding RPN/NRPN MIDI2 messages
  ASoC: mediatek: mt8195: Add platform entry for ETDM1_OUT_BE dai link
  ASoC: fsl-asoc-card: set priv->pdev before using it
  ASoC: amd: acp: move chip->flag variable assignment
  ASoC: amd: acp: remove i2s configuration check in acp_i2s_probe()
  ASoC: amd: acp: add a null check for chip_pdev structure
  ASoC: Intel: soc-acpi: mtl: fix speaker no sound on Dell SKU 0C64
  ASoC: q6apm-lpass-dai: close graph on prepare errors
  ASoC: cs35l56: Disconnect ASP1 TX sources when ASP1 DAI is hooked up
  ASoC: topology: Fix route memory corruption
  ASoC: rt722-sdca-sdw: add debounce time for type detection
  ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback
  ...
  • Loading branch information
torvalds committed Jun 27, 2024
2 parents afcd481 + 4b3e381 commit 3c1d29e
Show file tree
Hide file tree
Showing 33 changed files with 220 additions and 85 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -18209,6 +18209,7 @@ QCOM AUDIO (ASoC) DRIVERS
M: Srinivas Kandagatla <[email protected]>
M: Banajit Goswami <[email protected]>
L: [email protected] (moderated for non-subscribers)
L: [email protected]
S: Supported
F: Documentation/devicetree/bindings/soc/qcom/qcom,apr*
F: Documentation/devicetree/bindings/sound/qcom,*
Expand Down
1 change: 1 addition & 0 deletions include/sound/dmaengine_pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream
int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
struct dma_chan *chan);
int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream);
int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *substream);

int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
dma_filter_fn filter_fn, void *filter_data);
Expand Down
22 changes: 22 additions & 0 deletions sound/core/pcm_dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,16 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
}
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan);

int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *substream)
{
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);

dmaengine_synchronize(prtd->dma_chan);

return 0;
}
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_sync_stop);

/**
* snd_dmaengine_pcm_close - Close a dmaengine based PCM substream
* @substream: PCM substream
Expand All @@ -358,6 +368,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan);
int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream)
{
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
struct dma_tx_state state;
enum dma_status status;

status = dmaengine_tx_status(prtd->dma_chan, prtd->cookie, &state);
if (status == DMA_PAUSED)
dmaengine_terminate_async(prtd->dma_chan);

dmaengine_synchronize(prtd->dma_chan);
kfree(prtd);
Expand All @@ -378,6 +394,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_close);
int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream)
{
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
struct dma_tx_state state;
enum dma_status status;

status = dmaengine_tx_status(prtd->dma_chan, prtd->cookie, &state);
if (status == DMA_PAUSED)
dmaengine_terminate_async(prtd->dma_chan);

dmaengine_synchronize(prtd->dma_chan);
dma_release_channel(prtd->dma_chan);
Expand Down
2 changes: 2 additions & 0 deletions sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,8 @@ static int snd_pcm_pre_resume(struct snd_pcm_substream *substream,
snd_pcm_state_t state)
{
struct snd_pcm_runtime *runtime = substream->runtime;
if (runtime->state != SNDRV_PCM_STATE_SUSPENDED)
return -EBADFD;
if (!(runtime->info & SNDRV_PCM_INFO_RESUME))
return -ENOSYS;
runtime->trigger_master = substream;
Expand Down
10 changes: 6 additions & 4 deletions sound/core/seq/seq_ump_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,8 @@ static int paf_ev_to_ump_midi2(const struct snd_seq_event *event,

/* set up the MIDI2 RPN/NRPN packet data from the parsed info */
static void fill_rpn(struct snd_seq_ump_midi2_bank *cc,
union snd_ump_midi2_msg *data)
union snd_ump_midi2_msg *data,
unsigned char channel)
{
if (cc->rpn_set) {
data->rpn.status = UMP_MSG_STATUS_RPN;
Expand All @@ -808,6 +809,7 @@ static void fill_rpn(struct snd_seq_ump_midi2_bank *cc,
}
data->rpn.data = upscale_14_to_32bit((cc->cc_data_msb << 7) |
cc->cc_data_lsb);
data->rpn.channel = channel;
cc->cc_data_msb = cc->cc_data_lsb = 0;
}

Expand Down Expand Up @@ -855,7 +857,7 @@ static int cc_ev_to_ump_midi2(const struct snd_seq_event *event,
cc->cc_data_lsb = val;
if (!(cc->rpn_set || cc->nrpn_set))
return 0; // skip
fill_rpn(cc, data);
fill_rpn(cc, data, channel);
return 1;
}

Expand Down Expand Up @@ -957,7 +959,7 @@ static int ctrl14_ev_to_ump_midi2(const struct snd_seq_event *event,
cc->cc_data_lsb = lsb;
if (!(cc->rpn_set || cc->nrpn_set))
return 0; // skip
fill_rpn(cc, data);
fill_rpn(cc, data, channel);
return 1;
}

Expand Down Expand Up @@ -1018,7 +1020,7 @@ static int system_2p_ev_to_ump_midi2(const struct snd_seq_event *event,
union snd_ump_midi2_msg *data,
unsigned char status)
{
return system_1p_ev_to_ump_midi1(event, dest_port,
return system_2p_ev_to_ump_midi1(event, dest_port,
(union snd_ump_midi1_msg *)data,
status);
}
Expand Down
25 changes: 24 additions & 1 deletion sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -7525,6 +7525,7 @@ enum {
ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
ALC256_FIXUP_CHROME_BOOK,
ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7,
ALC287_FIXUP_LENOVO_SSID_17AA3820,
};

/* A special fixup for Lenovo C940 and Yoga Duet 7;
Expand Down Expand Up @@ -7596,6 +7597,20 @@ static void alc287_fixup_lenovo_legion_7(struct hda_codec *codec,
__snd_hda_apply_fixup(codec, id, action, 0);
}

/* Yet more conflicting PCI SSID (17aa:3820) on two Lenovo models */
static void alc287_fixup_lenovo_ssid_17aa3820(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{
int id;

if (codec->core.subsystem_id == 0x17aa3820)
id = ALC269_FIXUP_ASPIRE_HEADSET_MIC; /* IdeaPad 330-17IKB 81DM */
else /* 0x17aa3802 */
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* "Yoga Duet 7 13ITL6 */
__snd_hda_apply_fixup(codec, id, action, 0);
}

static const struct hda_fixup alc269_fixups[] = {
[ALC269_FIXUP_GPIO2] = {
.type = HDA_FIXUP_FUNC,
Expand Down Expand Up @@ -9832,6 +9847,10 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC225_FIXUP_HEADSET_JACK
},
[ALC287_FIXUP_LENOVO_SSID_17AA3820] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc287_fixup_lenovo_ssid_17aa3820,
},
};

static const struct snd_pci_quirk alc269_fixup_tbl[] = {
Expand Down Expand Up @@ -10069,6 +10088,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
Expand Down Expand Up @@ -10222,6 +10242,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
Expand Down Expand Up @@ -10530,7 +10553,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 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330 / Yoga Duet 7", ALC287_FIXUP_LENOVO_SSID_17AA3820),
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),
Expand Down
8 changes: 0 additions & 8 deletions sound/soc/amd/acp/acp-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,20 +588,12 @@ static int acp_i2s_probe(struct snd_soc_dai *dai)
{
struct device *dev = dai->component->dev;
struct acp_dev_data *adata = dev_get_drvdata(dev);
struct acp_resource *rsrc = adata->rsrc;
unsigned int val;

if (!adata->acp_base) {
dev_err(dev, "I2S base is NULL\n");
return -EINVAL;
}

val = readl(adata->acp_base + rsrc->i2s_pin_cfg_offset);
if (val != rsrc->i2s_mode) {
dev_err(dev, "I2S Mode not supported val %x\n", val);
return -EINVAL;
}

return 0;
}

Expand Down
12 changes: 7 additions & 5 deletions sound/soc/amd/acp/acp-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
ret = -EINVAL;
goto release_regions;
}
chip->flag = flag;
dmic_dev = platform_device_register_data(dev, "dmic-codec", PLATFORM_DEVID_NONE, NULL, 0);
if (IS_ERR(dmic_dev)) {
dev_err(dev, "failed to create DMIC device\n");
Expand Down Expand Up @@ -139,7 +140,6 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
}
}

chip->flag = flag;
memset(&pdevinfo, 0, sizeof(pdevinfo));

pdevinfo.name = chip->name;
Expand Down Expand Up @@ -199,10 +199,12 @@ static int __maybe_unused snd_acp_resume(struct device *dev)
ret = acp_init(chip);
if (ret)
dev_err(dev, "ACP init failed\n");
child = chip->chip_pdev->dev;
adata = dev_get_drvdata(&child);
if (adata)
acp_enable_interrupts(adata);
if (chip->chip_pdev) {
child = chip->chip_pdev->dev;
adata = dev_get_drvdata(&child);
if (adata)
acp_enable_interrupts(adata);
}
return ret;
}

Expand Down
7 changes: 7 additions & 0 deletions sound/soc/amd/yc/acp6x-mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "M5402RA"),
}
},
{
.driver_data = &acp6x_card,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "M5602RA"),
}
},
{
.driver_data = &acp6x_card,
.matches = {
Expand Down
7 changes: 5 additions & 2 deletions sound/soc/atmel/atmel-classd.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,19 +473,22 @@ static int atmel_classd_asoc_card_init(struct device *dev,
if (!dai_link)
return -ENOMEM;

comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL);
comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL);
if (!comp)
return -ENOMEM;

dai_link->cpus = comp;
dai_link->cpus = &comp[0];
dai_link->codecs = &snd_soc_dummy_dlc;
dai_link->platforms = &comp[1];

dai_link->num_cpus = 1;
dai_link->num_codecs = 1;
dai_link->num_platforms = 1;

dai_link->name = "CLASSD";
dai_link->stream_name = "CLASSD PCM";
dai_link->cpus->dai_name = dev_name(dev);
dai_link->platforms->name = dev_name(dev);

card->dai_link = dai_link;
card->num_links = 1;
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/codecs/cs35l56-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ static const struct reg_sequence cs35l56_asp1_defaults[] = {
REG_SEQ0(CS35L56_ASP1_FRAME_CONTROL5, 0x00020100),
REG_SEQ0(CS35L56_ASP1_DATA_CONTROL1, 0x00000018),
REG_SEQ0(CS35L56_ASP1_DATA_CONTROL5, 0x00000018),
REG_SEQ0(CS35L56_ASP1TX1_INPUT, 0x00000000),
REG_SEQ0(CS35L56_ASP1TX2_INPUT, 0x00000000),
REG_SEQ0(CS35L56_ASP1TX3_INPUT, 0x00000000),
REG_SEQ0(CS35L56_ASP1TX4_INPUT, 0x00000000),
};

/*
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/cs42l43-jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int cs42l43_set_jack(struct snd_soc_component *component,
priv->buttons[3] = 735;
}

ret = cs42l43_find_index(priv, "cirrus,detect-us", 1000, &priv->detect_us,
ret = cs42l43_find_index(priv, "cirrus,detect-us", 50000, &priv->detect_us,
cs42l43_accdet_us, ARRAY_SIZE(cs42l43_accdet_us));
if (ret < 0)
goto error;
Expand Down Expand Up @@ -433,7 +433,7 @@ irqreturn_t cs42l43_button_press(int irq, void *data)

// Wait for 2 full cycles of comb filter to ensure good reading
queue_delayed_work(system_wq, &priv->button_press_work,
msecs_to_jiffies(10));
msecs_to_jiffies(20));

return IRQ_HANDLED;
}
Expand Down
8 changes: 6 additions & 2 deletions sound/soc/codecs/es8326.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,12 +857,16 @@ static void es8326_jack_detect_handler(struct work_struct *work)
* set auto-check mode, then restart jack_detect_work after 400ms.
* Don't report jack status.
*/
regmap_write(es8326->regmap, ES8326_INT_SOURCE,
(ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON));
regmap_write(es8326->regmap, ES8326_INT_SOURCE, 0x00);
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x03, 0x01);
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x10, 0x00);
es8326_enable_micbias(es8326->component);
usleep_range(50000, 70000);
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x03, 0x00);
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x10, 0x10);
usleep_range(50000, 70000);
regmap_write(es8326->regmap, ES8326_INT_SOURCE,
(ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON));
regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x1f);
regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x08);
queue_delayed_work(system_wq, &es8326->jack_detect_work,
Expand Down
24 changes: 18 additions & 6 deletions sound/soc/codecs/rt5645.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static const struct reg_sequence init_list[] = {
static const struct reg_sequence rt5650_init_list[] = {
{0xf6, 0x0100},
{RT5645_PWR_ANLG1, 0x02},
{RT5645_IL_CMD3, 0x0018},
{RT5645_IL_CMD3, 0x6728},
};

static const struct reg_default rt5645_reg[] = {
Expand Down Expand Up @@ -3130,20 +3130,32 @@ static void rt5645_enable_push_button_irq(struct snd_soc_component *component,
bool enable)
{
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
int ret;

if (enable) {
snd_soc_dapm_force_enable_pin(dapm, "ADC L power");
snd_soc_dapm_force_enable_pin(dapm, "ADC R power");
snd_soc_dapm_sync(dapm);

snd_soc_component_update_bits(component, RT5650_4BTN_IL_CMD2,
RT5645_EN_4BTN_IL_MASK | RT5645_RST_4BTN_IL_MASK,
RT5645_EN_4BTN_IL_EN | RT5645_RST_4BTN_IL_RST);
usleep_range(10000, 15000);
snd_soc_component_update_bits(component, RT5650_4BTN_IL_CMD2,
RT5645_EN_4BTN_IL_MASK | RT5645_RST_4BTN_IL_MASK,
RT5645_EN_4BTN_IL_EN | RT5645_RST_4BTN_IL_NORM);
msleep(50);
ret = snd_soc_component_read(component, RT5645_INT_IRQ_ST);
pr_debug("%s read %x = %x\n", __func__, RT5645_INT_IRQ_ST,
snd_soc_component_read(component, RT5645_INT_IRQ_ST));
snd_soc_component_write(component, RT5645_INT_IRQ_ST, ret);
ret = snd_soc_component_read(component, RT5650_4BTN_IL_CMD1);
pr_debug("%s read %x = %x\n", __func__, RT5650_4BTN_IL_CMD1,
snd_soc_component_read(component, RT5650_4BTN_IL_CMD1));
snd_soc_component_write(component, RT5650_4BTN_IL_CMD1, ret);
snd_soc_component_update_bits(component, RT5650_4BTN_IL_CMD1, 0x3, 0x3);
snd_soc_component_update_bits(component,
RT5645_INT_IRQ_ST, 0x8, 0x8);
snd_soc_component_update_bits(component,
RT5650_4BTN_IL_CMD2, 0x8000, 0x8000);
snd_soc_component_read(component, RT5650_4BTN_IL_CMD1);
pr_debug("%s read %x = %x\n", __func__, RT5650_4BTN_IL_CMD1,
snd_soc_component_read(component, RT5650_4BTN_IL_CMD1));
} else {
snd_soc_component_update_bits(component, RT5650_4BTN_IL_CMD2, 0x8000, 0x0);
snd_soc_component_update_bits(component, RT5645_INT_IRQ_ST, 0x8, 0x0);
Expand Down
6 changes: 6 additions & 0 deletions sound/soc/codecs/rt5645.h
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,12 @@
#define RT5645_ZCD_HP_DIS (0x0 << 15)
#define RT5645_ZCD_HP_EN (0x1 << 15)

/* Buttons Inline Command Function 2 (0xe0) */
#define RT5645_EN_4BTN_IL_MASK (0x1 << 15)
#define RT5645_EN_4BTN_IL_EN (0x1 << 15)
#define RT5645_RST_4BTN_IL_MASK (0x1 << 14)
#define RT5645_RST_4BTN_IL_RST (0x0 << 14)
#define RT5645_RST_4BTN_IL_NORM (0x1 << 14)

/* Codec Private Register definition */
/* DAC ADC Digital Volume (0x00) */
Expand Down
Loading

0 comments on commit 3c1d29e

Please sign in to comment.