alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Petersen <jnsptrsn1@gmail.com>
To: Pavel Hofman <pavel.hofman@ivitera.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: M-Audio Audiophile 192 (ice1724)'s broken spdif capture
Date: Thu, 31 Jan 2013 23:25:10 +0100	[thread overview]
Message-ID: <510AEF46.1080608@gmail.com> (raw)
In-Reply-To: <510A485F.9060100@ivitera.com>

Am 31.01.2013 11:33, schrieb Pavel Hofman:
> OK, it looks we have a problem in communication with the chip. IMO the
> 4wire_start and 4wire_finish code is incorrect. As chip-select it takes
> VT1724_REVO_CS1, but for ak4114 it should be VT1724_REVO_CS3 (as defined
> in revo.h)
>
> IMO the two methods should be:
> static unsigned int ap192_4wire_start(struct snd_ice1712 *ice)
> {
> 	unsigned int tmp;
>
> 	snd_ice1712_save_gpio_status(ice);
> 	tmp = snd_ice1712_gpio_read(ice);
> 	tmp |= VT1724_REVO_CCLK; /* high at init */
> 	tmp |= VT1724_REVO_CS0;
> 	tmp &= ~VT1724_REVO_CS3;
> 	snd_ice1712_gpio_write(ice, tmp);
> 	udelay(1);
> 	return tmp;
> }


Btw. is it really intended that CS0 is set and CS3 is unset in 
4wire_start? (In 4wire_finish CS0 is set again.)


> static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp)
> {
> 	tmp |= VT1724_REVO_CS0;
> 	tmp |= VT1724_REVO_CS3;
> 	snd_ice1712_gpio_write(ice, tmp);
> 	udelay(1);
> 	snd_ice1712_restore_gpio_status(ice);
> }
>
> Provided that VT1724_REVO_CS0 is chip-select for AK4358 DAC and
> VT1724_REVO_CS3 chip-select for AK4114. The AK5385 ADC has no control.

CS0 (0x10) is GPIO4 and CS3 (0x80) is GPIO7, right?

Physically GPIO7 goes to CSN (pin 35) of the AK4114, as I confirmed before.

GPIO4 goes to CSN (pin 21) of the AK4358. I just did a physical check to 
confirm that also!

So I guess (hope) that would confirm that "VT1724_REVO_CS0 is 
chip-select for AK4358 DAC and
VT1724_REVO_CS3 chip-select for AK4114"

One question: What do you mean by "The AK5385 ADC has no control."? Is 
that by nature of the chip?


> IMO the ak4xxx config section should use VT1724_REVO_CS3 instead of
> VT1724_REVO_CS1 too:
>
> static struct snd_ak4xxx_private akm_ap192_priv = {
> 	.caddr = 2,
> 	.cif = 0,
> 	.data_mask = VT1724_REVO_CDOUT,
> 	.clk_mask = VT1724_REVO_CCLK,
> 	.cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS3,
> 	.cs_addr = VT1724_REVO_CS3,
> 	.cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS3,
> 	.add_flags = VT1724_REVO_CCLK, /* high at init */
> 	.mask_flags = 0,
> };
>
> If I am not mistaken VT1724_REVO_CS1 is not used on ap192 at all. Is
> that correct?

That woud be GPIO5, right? I'm not sure. If this is the case, wouldn't 
that pin not be tied to some level (high or low)?


> Sorry for not using proper patches but I cannot test the result anyway.

No problem. I tested, but still no succes.. :(

I noticed one more thing:

VT1724_REVO_CDIN (GPIO2) goes to CDTO and
VT1724_REVO_CDOUT (GPIO3) goes to CDTI of the AK4114. "IN" is "O" and 
"OUT" is "I". Ist that correct? I tried to swap them once but that 
didn't help either.

- Jonas

  reply	other threads:[~2013-01-31 22:25 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 [this message]
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
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=510AEF46.1080608@gmail.com \
    --to=jnsptrsn1@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=pavel.hofman@ivitera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).