[alsa-devel] [PATCH 0/1] HDSPM RME RayDAT sync reporting
Hi!
This patch is supposed to be applied on top of my recent series of patches (60e952bdb537c72dea4484711c9cc00383f78393).
Cheers
Adrian Knoth (1): ALSA: hdspm - Fix sync check reporting on RME RayDAT
sound/pci/rme9652/hdspm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
The RayDAT reports the sync status of its inputs in consecutive bit positions, so all we do in hdspm_s1_sync_check is to iterate over idx:
status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
lock = (status & (0x1<<idx)) ? 1 : 0; sync = (status & (0x100<<idx)) ? 1 : 0;
The index is given in kcontrol->private_value:
HDSPM_SYNC_CHECK("WC SyncCheck", 0), HDSPM_SYNC_CHECK("AES SyncCheck", 1), HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2), HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3), HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4), HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5), HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6), HDSPM_SYNC_CHECK("TCO SyncCheck", 7), HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8),
The patch corrects the indicated sync flags by passing the proper index value to hdspm_s1_sync_check().
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de --- sound/pci/rme9652/hdspm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 35bb213..d7cc911 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -3977,7 +3977,8 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol, case 8: /* SYNC IN */ val = hdspm_sync_in_sync_check(hdspm); break; default: - val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1); + val = hdspm_s1_sync_check(hdspm, + kcontrol->private_value-1); } break;
At Wed, 7 Nov 2012 18:00:08 +0100, Adrian Knoth wrote:
Hi!
This patch is supposed to be applied on top of my recent series of patches (60e952bdb537c72dea4484711c9cc00383f78393).
I don't see this object in sound git tree. Which one in the upstream tree?
alsa-kernel.git master branch contains lots of bogus rebased commits, so don't trust the hash id on it...
Takashi
On 11/07/2012 06:16 PM, Takashi Iwai wrote:
This patch is supposed to be applied on top of my recent series of patches (60e952bdb537c72dea4484711c9cc00383f78393).
I don't see this object in sound git tree. Which one in the upstream tree?
On top of f27a64f9973ff932ece576793c195de60c1c6c9b
By the way, I'm working against git://github.com/tiwai/sound.git, is this no longer the correct location? Looks like you're back to git.kernel.org...
Cheers
At Wed, 07 Nov 2012 18:36:38 +0100, Adrian Knoth wrote:
On 11/07/2012 06:16 PM, Takashi Iwai wrote:
This patch is supposed to be applied on top of my recent series of patches (60e952bdb537c72dea4484711c9cc00383f78393).
I don't see this object in sound git tree. Which one in the upstream tree?
On top of f27a64f9973ff932ece576793c195de60c1c6c9b
OK.
By the way, I'm working against git://github.com/tiwai/sound.git, is this no longer the correct location? Looks like you're back to git.kernel.org...
Yes, the one in git.kernel.org is the right repo. I still update github repo but forget too often.
In anyway, I applied the patch now. Thanks.
Takashi
participants (2)
-
Adrian Knoth
-
Takashi Iwai