From: Pavel Hofman <pavel.hofman@ivitera.com>
To: Jonas Petersen <jnsptrsn1@gmail.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: M-Audio Audiophile 192 (ice1724)'s broken spdif capture
Date: Mon, 04 Feb 2013 17:56:54 +0100 [thread overview]
Message-ID: <510FE856.9050206@ivitera.com> (raw)
In-Reply-To: <510D9799.6070307@gmail.com>
On 2.2.2013 23:47, Jonas Petersen wrote:
> Am 02.02.2013 11:44, schrieb Pavel Hofman:
>
> Yeah, I found the right combination, it's OCKS0=1,OCKS1=0. Now the spdif
> input works, thank you!
Congrats.
>
> I wonder why there is no level controls for the analog input (e.g. in
> alsamixer). Is that because the "AK5385 ADC chip has no control"? The
> ESI Juli doesn't have an analog input level control as well.
Right, ak5385 offers no attenuation control.
>
>
> Ok, to make it clear, on the ap192 the FSx registers are always at their
> default (0001). So far I've never seen them on any other value. Only the
> corresponding Channel Status bits do change.
OK
>
> Well, I guess by default snd_ak4114_rate_get should still interpret the
> FSx bits. Other cards might work as expected (see 'Observation C' below).
> In the case of the ap192 it might make sense to read the Channel Status.
> Maybe it needs a flag that gets set on card initializing indicating what
> should be used?
>
> But, after all it seems there is still something obscure in the rate
> detection. Because while watching the ak4114 registers when switching
> sample rates I made the following observations:
>
> Observation A:
>
> RME Multiface spdif out goes to AP192 spdif in. In Linux the FSx bits
> are alwas "0001" and the Channel Status bis are set according to sample
> rate and mode (consumer/professional).
That means the RME driver configured the SPDIF-out preamble correctly.
In alsa e.g. using the iecset tool.
>
> Observation B:
>
> ESI Julia spdif out goes to AP192 spdif in. (Recall that in windows the
> AP192 _does_ detect sample rate changes!)
> In Linux the FSx bits are alwas "0001" and the Channel Status bis are
> (almost) always _all_ "0". It seems the ESI does not send Channel Status
> at all (could it be the misconfiguration of the ESI?). It looks like this:
>
> 0x07 = 0x10 (00010000) [FS3,2,1,0 etc.]
> 0x08 = 0x00 (00000000) [CS0]
> 0x09 = 0x00 (00000000) [CS1]
> 0x0a = 0x00 (00000000) [CS2]
> 0x0b = 0x00 (00000000) [CS3]
> 0x0c = 0x00 (00000000) [CS4]
>
> There is one strange exception. When I switch the output to spdif in the
> (I think it is) pulseaudio GUI. Then register 0x09 will be '00000010'
> for 5 second and switch back to '00000000'. When I play the test sound,
> then register 0x09 _and_ register 0x0b will be '00000010' for 5 second
> and switch back. Other than that the Channel Status does not change.
I do not know in windows, but in alsa the SPDIF bits can be set
explicitly by user space. See the AESx params in
/usr/share/alsa/pcm/iec958.conf , /usr/share/alsa/cards/ICE1724.conf
(setting the alsa control "IEC958 Playback Default"). ICE1724 datasheet
says the integrated SPDIF transmitter should set the corresponding SPDIF
bits (reg MT3C) automatically:
quote
These bits declare the S/PDIF transmitter clock rate (64*fs) in the
Channel Status Byte 3, low
nibble if Consumer mode (MT3C_0 = 0) and Byte 0 (bits 7-6) and Byte 4
(bits 6-3) if
Professional mode (MT3C_0 = 1). It will be set automatically by MT01 low
nibble if master. In
slave mode (MT01_4 = 1), to display the correct sampling rate, it must
be written to reflect the
external clock recovered.
endquote
>
> Now, how is the windows driver detecting the rate if there is a) no
> crystal in there and b) no Channel Status available? Might it be the
> clock being on PLL (I'm not realy aware of what that means right now)?
I do not know, are you sure there is really no channel status available?
>
> One thing might be of interest here: when switching the sample rates,
> register 0x06 does the following: Bit 0, bit 4 and flash to 1 for a
> short moment and back to zero (sometimes 2 times in a row).
>
> 0x06 = 0x11 (00010001) [flash to 1]
> 0x06 = 0x00 (00000000) [and back to 0]
>
> Bit 0 is "PAR: Parity Error or Biphase Error Status"
> Bit 4 is "PLL Lock Status" (1 being "Out of Lock")
>
> Observation C (this is regarding ESI Juli):
>
> dbx 376 tube channel strip spdif out goes to ESI Juli spdif in.
> The FSx bits in register 0x07 of ESI Juli's AK4114 _do_ change on
> different sample rates. They do not match those in the datasheet though:
>
> 1000 - 44kHz (expected: 0000)
> 1010 - 48kHz (expected: 0010)
> 1100 - 88.2kHz (expected: 1000)
> 1110 - 96kHz (expected: 1010)
>
> So maybe this is another symptom of the ESI's misconfiguration?
When I tested the driver of Juli the values worked correctly. Let's
figure out AP192 first and then attack Juli :)
>
>
>> Back to the light indicating "sync source" in the windows driver. I
>> think it is reading status of GPIO06 as you reported "INT0 (pin36) --
>> GPIO6 pin 58". It would be possible to add a new read-only control for
>> sync source to revo.c for ap192. It might be useful. Of course a generic
>> method for ak4114.c would be more suitable but we would have to abstract
>> the reading method.
>
> Ok, why not adding a control for that. But first explain something to
> me. I see these 15 control definitions "snd_ak4114_iec958_controls[]" in
> ak4114.c. How are they accessed? Where can I read for example the
> "IEC958 External Rate" value? In the proc dir they do not show up.
> Neither at Juli nor at AP192. Are these only API functions?
see output of amixer contents. They are defined as PCM-type controls
(not MIXER type and do not apper e.g. in alsamixer.
Regards,
Pavel.
next prev parent reply other threads:[~2013-02-04 16:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-26 16:35 M-Audio Audiophile 192 (ice1724)'s broken spdif capture Jonas Petersen
2013-01-26 19:30 ` Jaroslav Kysela
2013-01-26 21:20 ` Pavel Hofman
2013-01-26 22:37 ` Jonas Petersen
2013-01-27 15:49 ` Jonas Petersen
2013-01-28 9:29 ` Jaroslav Kysela
2013-01-28 12:52 ` Pavel Hofman
2013-01-28 21:25 ` Jonas Petersen
2013-01-29 9:44 ` Pavel Hofman
2013-01-31 1:19 ` Jonas Petersen
2013-01-31 9:04 ` Pavel Hofman
2013-01-31 20:56 ` Jonas Petersen
2013-01-28 12:36 ` Pavel Hofman
2013-01-29 0:32 ` Jonas Petersen
2013-01-29 9:39 ` Pavel Hofman
2013-01-29 13:10 ` Jonas Petersen
2013-01-30 10:30 ` Pavel Hofman
2013-01-29 19:14 ` Jonas Petersen
2013-01-30 10:26 ` Pavel Hofman
2013-01-30 15:34 ` Pavel Hofman
2013-01-31 0:29 ` Jonas Petersen
2013-01-31 10:33 ` Pavel Hofman
2013-01-31 22:25 ` Jonas Petersen
2013-02-02 1:22 ` Jonas Petersen
2013-02-02 10:44 ` Pavel Hofman
2013-02-02 22:47 ` Jonas Petersen
2013-02-04 16:56 ` Pavel Hofman [this message]
2013-02-23 22:13 ` Jonas Petersen
2013-02-25 11:47 ` Pavel Hofman
2013-01-26 21:29 ` Jonas Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=510FE856.9050206@ivitera.com \
--to=pavel.hofman@ivitera.com \
--cc=alsa-devel@alsa-project.org \
--cc=jnsptrsn1@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.