Repository navigation
ASoC: rt711-sdca: fix mbq_regmap issues - #2925
Conversation
|
@bardliao LGTM. Thanks. |
9e3a08b to
c0d7c8b
Compare
|
Update commit message. |
| regcache_cache_only(rt711->regmap, true); | ||
| regcache_cache_only(rt711->mbq_regmap, true); | ||
| regcache_mark_dirty(rt711->regmap); | ||
| regcache_mark_dirty(rt711->mbq_regmap); |
There was a problem hiding this comment.
that's not the right fix, we need to extend the existing one with this
if (rt711->first_hw_init) {
regcache_cache_bypass(rt711->regmap, false);
regcache_mark_dirty(rt711->regmap);
>> regcache_cache_bypass(rt711->regmap_mbq, false);
>> regcache_mark_dirty(rt711->regmap_mbq);
} else
rt711->first_hw_init = true;
There was a problem hiding this comment.
that's not the right fix, we need to extend the existing one with this
if (rt711->first_hw_init) { regcache_cache_bypass(rt711->regmap, false); regcache_mark_dirty(rt711->regmap); >> regcache_cache_bypass(rt711->regmap_mbq, false); >> regcache_mark_dirty(rt711->regmap_mbq); } else rt711->first_hw_init = true;
I did it in the next patch. I think we need both because there are two scenarios.
- Codec is unattached. In this case we need to do
rt711_sdca_io_init - Common suspend/resume case. In this case we don't need to do
rt711_sdca_io_init, but need to sync some registers since they will be restore to default when we do bus reset.
There was a problem hiding this comment.
@bardliao I think we are not aligned on the io_init case. This function will be used when we reattach, and there's no difference between the codec resetting on its own and the bus reset. The codec becoming un-attached can be for different reasons with different side effects, but there is nothing that tells us what the source of the reset was. It's a miss in the SoundWire spec and as a result software has to assume that all the state was lost every time the device re-attaches.
There was a problem hiding this comment.
@plbossart So the problem is actually sdw_update_slave_status(SDW_SLAVE_UNATTACHED) is never triggered in the reattach case. See dmesg.txt with bard.diff.txt. Therefore, rt711->hw_init = false; and rt711_sdca_io_init will not be invoked
I will look into it.
There was a problem hiding this comment.
@plbossart I got why sdw_update_slave_status(SDW_SLAVE_UNATTACHED) is never triggered now. We call sdw_modify_slave_status without sdw_update_slave_status in sdw_clear_slave_status. As a result, sdw_update_slave_status(SDW_SLAVE_UNATTACHED) will never be invoked elsewhere due to the
status is not changed. Please see #2928.
However, with #2928 and this PR updated, I see
[ 76.370376] rt711-sdca sdw:0:025d:0711:01: DPN_PortCtrl register write failed for port 3
[ 76.370380] soundwire sdw-master-0: Program transport params failed: -61
[ 76.370382] soundwire sdw-master-0: Program params failed: -61
dmesg.txt
I think it could be something wrong with rt711_sdca_io_init @shumingfan FYI
c0d7c8b to
72f7951
Compare
SDW_SDCA_CTL() registers are used but are not set to readable. Fixes: 7ad4d23 ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver') Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
We currently only hangle rt711->regmap in rt711_sdca_io_init(), and rt711->mbq_regmap is missing. Fixes: 7ad4d23 ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver') Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
72f7951 to
db48b50
Compare
Done |
The regcache_sync() function actually do nothing since regcache_mark_dirty() is not called in the existing code. We call regcache_mark_dirty() in rt711_sdca_io_init(), but rt711_sdca_io_init() will not be invoked since
rt711->hw_initis true.Fixes: #2908