Re: [PATCH 1/2] ASoC: codecs: add support for ES8326

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> +             snd_soc_component_write(comp, ES8326_ADC1_SRC_2A, es8326->mic2_src);
>> +             snd_soc_component_write(comp, ES8326_ANA_MICBIAS_1B, 0x70);
>> +     } else if ((iface & ES8326_HPINSERT_FLAG) == ES8326_HPINSERT_FLAG) {
>
>> +
>> +static irqreturn_t es8326_irq(int irq, void *dev_id)
>> +{
>> +     struct es8326_priv *es8326 = dev_id;
>> +     struct snd_soc_component *comp = es8326->component;
>> +
>> +     snd_soc_component_write(comp, ES8326_ANA_MICBIAS_1B, 0x7c);
>
>this ES8326_ANA_MICBIAS_1B register is also modified in the workqueue,
>could this lead to invalid configurations?

In es8326_irq, MICBIAS is turned on to detect headphone from headset. When an unpluged
event is detected, MICBIAS is turned off to minimize pop noise. Maybe a comment/macro for this?

>> +     dev_dbg(comp->dev, "gpio flag %#04x", iface);
>> +     if ((iface & ES8326_HPINSERT_FLAG) == 0) {
>> +             dev_dbg(comp->dev, "No headset detected");
>> +             snd_soc_jack_report(es8326->jack, 0, SND_JACK_HEADSET);
>
>should you check if es8326->jack is set?
>in the 8316 driver you have a check for a spurious interrupt before
>set_jack() is called

I haven't seen other codecs (rt5640) handle spurious irq.

>it's rather odd that there's a resume but no suspend?

Since the codec loses power on suspend. It's also odd to write to the registers when they 
are going to be cleared during suspend. The lost registers need to be written during 
resume though. 



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux