]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: fsl_ssi: only enable proper channel slots in AC'97 mode
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Tue, 21 Nov 2017 23:54:26 +0000 (00:54 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 29 Nov 2017 10:39:28 +0000 (10:39 +0000)
commit01ca485171e3253f3aee555437519c0d316d4b0c
tree17b4d4d9b6c0ea0eeb51daf257b5439c266ac762
parentc997a92a78161af605b314cbe6cf636663999652
ASoC: fsl_ssi: only enable proper channel slots in AC'97 mode

We need to make sure that only proper channel slots (in SACCST register)
are enabled at playback start time since some AC'97 CODECs (like VT1613 on
UDOO board) were observed requesting via SLOTREQ spurious ones just after
an AC'97 link is started but before the CODEC is configured by its driver.
When a bit for some channel slot is set in a SLOTREQ request then SSI sets
the relevant bit in SACCST automatically, which then 'sticks' until it is
manually unset.
The SACCST register is not writable directly, we have to use SACCDIS and
SACCEN registers to configure it instead (these aren't normal registers:
writing a '1' bit at some position in SACCEN sets the relevant bit in
SACCST; SACCDIS operates in a similar way but allows unsetting bits in
SACCST).

Theoretically, this should be necessary only for the very first playback
but since some CODECs are so untrustworthy and extra channel slots enabled
mean ruined playback let's play safe here and make sure that no extra
slots are enabled in SACCST every time a playback is started.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c