From: Takashi Iwai <tiwai@suse.de>
To: CAG <cag@fsk-hh.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: M-Delta Audiophile 192 (ice1724) Recording
Date: Thu, 31 Jan 2008 17:16:31 +0100 [thread overview]
Message-ID: <s5hfxwe0y3k.wl%tiwai@suse.de> (raw)
In-Reply-To: <47A1ECC6.6040608@fsk-hh.org>
At Thu, 31 Jan 2008 16:44:06 +0100,
CAG wrote:
>
> Hi,
>
> we ran the alsa-info.sh script to provide more information on our setup:
> http://pastebin.ca/886260
>
> The output of /proc/asound/card0/ice1724 is at
> http://pastebin.ca/884589
Thanks. One more thing - could you tell how did you test the analog
recording exactly? I just need to make sure about your test method.
The patch below enables AK4114, and possibly fixes some ADC setup.
Give it a try.
Takashi
diff -r a4c88cbfe2f1 pci/ice1712/revo.c
--- a/pci/ice1712/revo.c Wed Jan 30 09:06:47 2008 +0100
+++ b/pci/ice1712/revo.c Thu Jan 31 17:18:35 2008 +0100
@@ -322,17 +322,24 @@ static void ap192_set_rate_val(struct sn
static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
{
struct snd_ice1712 *ice = ak->private_data[0];
+ int dfs;
revo_set_rate_val(ak, rate);
-#if 1 /* FIXME: do we need this procedure? */
- /* reset DFS pin of AK5385A for ADC, too */
- /* DFS0 (pin 18) -- GPIO10 pin 77 */
- snd_ice1712_save_gpio_status(ice);
- snd_ice1712_gpio_write_bits(ice, 1 << 10,
- rate > 48000 ? (1 << 10) : 0);
- snd_ice1712_restore_gpio_status(ice);
-#endif
+
+ /* reset CKS */
+ snd_ice1712_gpio_write_bits(ice, 1 << 8, rate > 96000 ? 1 : 0);
+ /* reset DFS pins of AK5385A for ADC, too */
+ if (rate > 96000)
+ dfs = 2;
+ else if (rate > 48000)
+ dfs = 1;
+ else
+ dfs = 0;
+ snd_ice1712_gpio_write_bits(ice, 3 << 9, dfs << 9);
+ /* reset ADC */
+ snd_ice1712_gpio_write_bits(ice, 1 << 11, 0);
+ snd_ice1712_gpio_write_bits(ice, 1 << 11, 1);
}
static const struct snd_akm4xxx_dac_channel ap192_dac[] = {
@@ -353,28 +360,20 @@ static struct snd_ak4xxx_private akm_ap1
.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,
+ .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1,
+ .cs_addr = VT1724_REVO_CS1,
+ .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1,
.add_flags = VT1724_REVO_CCLK, /* high at init */
.mask_flags = 0,
};
-#if 0
-/* FIXME: ak4114 makes the sound much lower due to some confliction,
- * so let's disable it right now...
- */
-#define BUILD_AK4114_AP192
-#endif
-
-#ifdef BUILD_AK4114_AP192
/* AK4114 support on Audiophile 192 */
/* CDTO (pin 32) -- GPIO2 pin 52
* CDTI (pin 33) -- GPIO3 pin 53 (shared with AK4358)
* CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358)
* CSN (pin 35) -- GPIO7 pin 59
*/
-#define AK4114_ADDR 0x00
+#define AK4114_ADDR 0x02
static void write_data(struct snd_ice1712 *ice, unsigned int gpio,
unsigned int data, int idx)
@@ -428,7 +427,7 @@ static unsigned int ap192_4wire_start(st
tmp = snd_ice1712_gpio_read(ice);
tmp |= VT1724_REVO_CCLK; /* high at init */
tmp |= VT1724_REVO_CS0;
- tmp &= ~VT1724_REVO_CS3;
+ tmp &= ~VT1724_REVO_CS1;
snd_ice1712_gpio_write(ice, tmp);
udelay(1);
return tmp;
@@ -436,7 +435,7 @@ static unsigned int ap192_4wire_start(st
static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp)
{
- tmp |= VT1724_REVO_CS3;
+ tmp |= VT1724_REVO_CS1;
tmp |= VT1724_REVO_CS0;
snd_ice1712_gpio_write(ice, tmp);
udelay(1);
@@ -485,13 +484,13 @@ static int __devinit ap192_ak4114_init(s
struct ak4114 *ak;
int err;
- return snd_ak4114_create(ice->card,
+ err = snd_ak4114_create(ice->card,
ap192_ak4114_read,
ap192_ak4114_write,
ak4114_init_vals, ak4114_init_txcsb,
ice, &ak);
+ return 0; /* igonre errors from AK4114 */
}
-#endif /* BUILD_AK4114_AP192 */
static int __devinit revo_init(struct snd_ice1712 *ice)
{
@@ -557,6 +556,9 @@ static int __devinit revo_init(struct sn
if (err < 0)
return err;
+ /* unmute all codecs */
+ snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
+ VT1724_REVO_MUTE);
break;
}
@@ -588,11 +590,9 @@ static int __devinit revo_add_controls(s
err = snd_ice1712_akm4xxx_build_controls(ice);
if (err < 0)
return err;
-#ifdef BUILD_AK4114_AP192
err = ap192_ak4114_init(ice);
if (err < 0)
return err;
-#endif
break;
}
return 0;
next prev parent reply other threads:[~2008-01-31 16:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 12:29 M-Delta Audiophile 192 (ice1724) Recording CAG
2008-01-30 12:07 ` Takashi Iwai
2008-01-30 13:52 ` CAG
2008-01-31 15:44 ` CAG
2008-01-31 16:16 ` Takashi Iwai [this message]
2008-01-31 17:12 ` CAG
[not found] ` <47A2014A.1040107@fsk-hh.org>
2008-01-31 17:26 ` Takashi Iwai
2008-01-31 17:33 ` CAG
2008-01-31 17:36 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2008-01-31 22:06 Computer AG im FSK
2008-01-31 22:51 ` Computer AG im FSK
2008-02-01 12:17 ` Takashi Iwai
2008-02-04 14:31 ` CAG
2008-02-04 15:04 ` Takashi Iwai
2008-02-04 17:37 ` CAG
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=s5hfxwe0y3k.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=cag@fsk-hh.org \
/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).