Re: ICE1724: Prodigyhd2 driver make problems?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Fri, 10 Nov 2006 05:42:50 +0900,
Hiroyuki Yokota wrote:
> 
> Hi, all. I join alsa-devel today.
> 
> I am doing develop Audiotark Prodigy HD2 driver now.
> Some problems can't goal to complete.
> 
> OS: Linux Ubuntu6.10 (Kernel 2.6.18)
> Source: Alsa driver souce included Kernel 2.6.18
> /usr/src/linux-2.6.18/sound/pci/ice1712/
> 
> Audiotrak prodigy hd2
> Envy24HT-S (VT1721)
> DAC AK4396 (SN 120dB)
> ADC AK5353
> output 2ch only, RCAx1, Headphonex1,Optx1
> input 2ch, Line-in (but Line goto ADC, Digital IN force to output 2ch)
> *input : for AD coverter, Headphone amp
> 
> Problems 1 Sounds resolustion is loose
> 
> Solution 1
> /usr/share/alsa/pcm/dmix.conf
> default S16_LE to default S32_LE
> 
> @args.FORMAT {
> type string
> default S32_LE
> }

Which ALSA version are you using?
In the recent version, ICE1724's default PCM setup is like below:

ICE1724.pcm.default {
        @args [ CARD ]
        @args.CARD {
                type string
        }
        type asym
        playback.pcm {
                type plug
                slave.pcm {
                        @func concat
                        strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
                }
        }
        capture.pcm {
                type plug
                slave.pcm {
                        @func concat
                        strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
                }
        }
}

Hence, it should choose S32_LE as its format.


> Promblems 2 /proc/asound/cards is displayed "ice1724"
> 
> ~$ cat /proc/asound/cards
> 0 [ICE1724 ]: ICE1724 - ICEnsemble ICE1724
> ICEnsemble ICE1724 at 0xac00, irq 233

Should be so unless you add a proper entry :)

> Challenge1 <This source is digest version>
> Modified Makefile, prodigyhd2.c & prodigyhd2.h (from revo.c), ice1724.c
> 
> <prodigyhd2.h>
> #define PRODIGYHD2_DEVICE_DESC \
> "{{Audiotrak,Prodigy HD2},"
> #define VT1724_SUBDEVICE_PRODIGYHD2 0x12140124
> 
> <prodigyhd2.c>
> static unsigned int prodigyhd2_num_stereo[] = {2};
> static char *prodigyhd2_channel_names[] = {"PCM Playback Volume"};
> 
> static struct snd_akm4xxx akm_prodigyhd2 __devinitdata = {
> .type = SND_AK4358,
> .num_dacs = 2,
> .ops = {
> .set_rate_val = prodigyhd2_set_rate_val
> },
> .num_stereo = prodigyhd2_num_stereo,
> .channel_names = prodigyhd2_channel_names
> };
> 
> static int __devinit prodigyhd2_init(struct snd_ice1712 *ice)
> {
> struct snd_akm4xxx *ak;
> int err;
> 
> /* determine I2C, DACs and ADCs */
> switch (ice->eeprom.subvendor) {
> case VT1724_SUBDEVICE_PRODIGYHD2:
> ice->num_total_dacs = 2;
> ice->num_total_adcs = 2;
> break;
> default:
> snd_BUG();
> return -EINVAL;
> }
> 
> /* second stage of initialization, analog parts and others */
> ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL);
> if (! ak)
> return -ENOMEM;
> ice->akm_codecs = 2;
> switch (ice->eeprom.subvendor) {
> case VT1724_SUBDEVICE_PRODIGYHD2:
> ice->akm_codecs = 1;
> if ((err = snd_ice1712_akm4xxx_init(ak, &akm_prodigyhd2,
> &akm_prodigyhd2_priv, ice)) < 0)
> return err;
> /* unmute all codecs - needed! */
> snd_ice1712_gpio_write_bits(ice, VT1724_PRODIGYHD2_MUTE,
> VT1724_PRODIGYHD2_MUTE);
> break;
> }
> 
> return 0;
> }
> 
> static int __devinit prodigyhd2_add_controls(struct snd_ice1712 *ice)
> {
> int err;
> 
> switch (ice->eeprom.subvendor) {
> case VT1724_SUBDEVICE_PRODIGYHD2:
> err = snd_ice1712_akm4xxx_build_controls(ice);
> if (err < 0)
> return err;
> }
> return 0;
> }
> 
> /* entry point */
> struct snd_ice1712_card_info snd_vt1724_prodigyhd2_cards[] __devinitdata = {
> {
> .subvendor = VT1724_SUBDEVICE_PRODIGYHD2,
> .name = "Audiotrak Prodigy HD2",
> .model = "prodigyhd2",
> .chip_init = prodigyhd2_init,
> .build_controls = prodigyhd2_add_controls,
> },
> { } /* terminator */
> };
> 
> <ice1724.c>
> static struct snd_ice1712_card_info *card_tables[] __devinitdata = {
> snd_vt1724_revo_cards,
> snd_vt1724_amp_cards,
> snd_vt1724_aureon_cards,
> snd_vt1720_mobo_cards,
> snd_vt1720_pontis_cards,
> snd_vt1724_prodigy192_cards,
> snd_vt1724_prodigyhd2_cards,
> snd_vt1724_juli_cards,
> snd_vt1724_phase_cards,
> NULL,
> };
> 
> Result 1
> 
> ~$ cat /proc/asound/cards
> 0 [HD2 ]: ICE1724 - Audiotrak Prodigy HD2
> Audiotrak Prodigy HD2 at 0xdc00, irq 233

That looks OK.  But the most important part, the implementation of
prodigyhd2_*() are missing, so I cannot judge properly yet.
Please attach a complete patch for review.


> Promblem 3
> 
> $ dmesg
> ice1724: Invalid EEPROM version 1

Well, it's a warning, not an error.

> Chellenge 2
> 
> I read source code with ice1724.c, and understand its message means.
> 
> /var/lib/alsa/asound.state
> 
> state.ICE1724 {
> control.1 {
> comment.access read
> comment.type BYTES
> comment.count 52
> iface CARD
> name 'ICE1724 EEPROM'
> value
> '240114121c01628030c3ff0000ff0000ff0000008100000000080000000000000000000000000000ff000000ff000000ff000000'
> }
> 
> EEPROM dump prodigyhd2 (value is display by hexeditor)
> 00000000 24 01 14 12 1C 01 62 80 30 C3 FF 00 00 FF 00 00 $.....b.0.......
> 00000010 FF 00 00 00 81 00 00 00 00 08 00 00 00 00 00 00 ................
> 00000020 00 00 00 00 00 00 00 00 FF 00 00 00 FF 00 00 00 ................
> 00000030 FF 00 00 00 ....
> 
> Refference ML LOG / SourceForge.net: alsa-cvslog
> http://sourceforge.net/mailarchive/mess … id=9338682
> <http://sourceforge.net/mailarchive/message.php?msg_id=9338682>
> 
> ice->eeprom.version = snd_vt1724_read_i2c(ice, dev, 0x05)
> This version, vt1724 is judged vt1712 ! , and result is Invalid.
> 
> "No Problem?"

No problem, indeed, in your case.  If it matters, you can provide a
modifed EEPROM image statically in the config table.


> Problem 4 ALSA mix contorol cant mix, or enable?
> 
> I dont control gnome volume applet, and fmod's mixing cant control.
> Music Player can volume cotrol, but multichannel is disabled. only one !

I don't understand what you mean here.
When you set num_dac = 2, it means you have only a single
stereo-channel PCM.
Or, if you implemented codec control routines wrongly, the mixer will
get confused, of course...

> Question: I want Envy24HT-S control Knowhow.
> "Transfer protcols is i2c, Conrotl interface GPIO, and Instruction is
> SPI or I2c. "
> by iwai (in slashdot.jp)
> 
> Please teach me.

Some devices use built-in i2c control of vt172x chip for controlling
the surrounding codec chips.  The multiple codecs are distinguished
via different i2c addresses.

Some devices use 3 or 4-wired SPI (or pseudo I2C) protocols to
communicate between the codec chip and the vt172x controller.
Usually, certain GPIO pins of vt172x are connected to codec chips.
In most cases, clock, chip-select and data-in/out pins are necessary.
We have a SPI framework for many AK4xxx chips which are used by
revo.c, etc.  For other chips, you'd need the own implementation of
SPI transfer.  See pontis.c, for example, where both i2c and SPI codes
are found.

For SPI mode, it's essential to know which GPIO pins are connected to
which codec pins.  Without this information, you cannot write the code
at all.  In the worst case, you'd need to debug it via
trial-and-error.


Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux