Re: USB audio adapters (CM6206 chip)

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

 



Dan,

The light of optical is on now... but don't send sound again... I'm
sending to iec958:CARD=default,DEV=0 or spdif:CARD=default,DEV=0, on
both I don't hear sound. And, if I change the receiver to my analog
out, I hear the music normal, as I was sending to hw:1,0. There must
be a switch on the windows drivers to allow sound to optical or
something.

Linux driver only report one device, and should report two, one as
analog and second as digital...

I'm testing now 5.1 analog and it's normal, I was using a test
Surround WAV and was garbled... but with a movie everything is fine,
or almost, the rear out and the center/lfe is exchanged, nothing
really bad. Both hw:1,0 and plughw:1,0 plays fine, the samplerate
mplayer says is 48khz.

tested with mplayer -channels 6 -ao alsa:device=hw=1,0 movieac3.avi
___________________
Fabrício Nihues



2009/5/23 Dan Allongo <gongo2k1@xxxxxxxxx>:
> Fabricio,
>
> Try changing the boot quirk function (around line 3270) to look like this:
>
> static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
> {
>     /*
>      * Enable line-out driver mode, set headphone source to front
>      * channels, enable stereo mic.
>      */
>     return snd_usb_cm106_write_int_reg(dev, 0, 0x0000) +
> snd_usb_cm106_write_int_reg(dev, 1, 0xf00d) +
> snd_usb_cm106_write_int_reg(dev, 2, 0x8003) +
> snd_usb_cm106_write_int_reg(dev, 3, 0x077f);
> }
>
>
> Using these settings, it seems to turn on the light on the SPDIF out, but I
> don't know if it's outputting anything.
> Register 0 is the configuration for the optical out, but the individual bits
> aren't documented.
> I may eventually resort back to packet sniffing with Wireshark, but this is
> low priority for me since I don't have the hardware to test.
> I'm still trying to figure out the 5.1 analog, it seems to be stuck in
> 'headphones only' mode.
>
> ---Dan
>
>
> On Fri, May 22, 2009 at 2:18 PM, Fabrício Nihues <fabricio.nihues@xxxxxxxxx>
> wrote:
>>
>> Hello Dan,
>>
>> I've tested the optical connection to my receiver and no sound
>> (exactly the same thing when optical is disabled on the windows
>> driver, maybe you can discover what the driver changes to allow sound
>> through optical out??), it appears to me as iec958 to my USB Audio
>> using aplay -L, with aplay -l only hw:1,0, no hw:1,1 etc etc (assuming
>> 0,1 is onboard snd).
>>
>> There is a "key" labelled PCM 2 and is checked too, dunno what means,
>> uncheking chenges nothing.
>>
>> Front analog out works, could not play any dts/ac3 to analog outs
>> because was getting garbled sound, noticed that 48khz music is bad,
>> ressampling to 44.1khz made normal. Maybe garbled sound that comes is
>> a 96Khz sound, but mplayer say it's 44khz.... weird.... got no more
>> time or ideas to test now, maybe some ideas to try analog 5.1 out? And
>> the optical out?
>>
>> Thanks
>> ___________________
>> Fabrício Nihues
>>
>>
>>
>> 2009/5/22 Fabrício Nihues <fabricio.nihues@xxxxxxxxx>:
>> > Dan!
>> >
>> > You are the man! Just tested your patch here, and worked great! At
>> > least the analog out! Later i'll test optical out to my receiver...
>> > one question remains for me, if the optical out can send 5.1 dts/ac3
>> > passthrough... on windows I cannot send it, I get "pink noise" when
>> > sending, only work 2ch via optical connection but no passthrough.
>> >
>> > Did you already send a bug fix to alsa devel or something?
>> >
>> > Thanks!
>> > ___________________
>> > Fabrício Nihues
>> >
>> >
>> > 2009/5/22 Dan Allongo <gongo2k1@xxxxxxxxx>
>> >>
>> >> Hi all.
>> >>
>> >> I just got this chip off of e-bay like the rest of you and was
>> >> disappointed to find that it's not working.
>> >> Well, it's now been a couple hours of reading the ALSA wiki and
>> >> figuring out where to look in the source code, but I've finally got this
>> >> chip working in .20 under Debian.
>> >>
>> >> After sniffing USB data with Wireshark on a VirtualBox instance of
>> >> WinXP, I noticed that config data was being sent from the host shortly after
>> >> device enumeration.
>> >> This makes sense since it didn't work in Windows either until I
>> >> installed the driver (so much for following USB audio standards?).
>> >> I can only assume that the drivers contain the default settings for the
>> >> device to be usable.
>> >> Why the registers don't look like this on reset is beyond me, but
>> >> whatever.
>> >>
>> >> In usbaudio.c in the snd_usb_audio_probe function (somewhere in the
>> >> vicinity of line 3500) you need to enable the "boot quirk" for this chip:
>> >>     /* C-Media CM6206 / CM106-Like Sound Device */
>> >>     if (id == USB_ID(0x0d8c, 0x0102)) {
>> >>         if (snd_usb_cm106_boot_quirk(dev) < 0)
>> >>             goto __err_val;
>> >>     }
>> >>
>> >>
>> >> Looks like the chip needs some config parameters sent to it via HID
>> >> which are already there courtesy of the Turtle Beach hack.
>> >> The register setup is outlined in the datasheet (I found it here:
>> >> http://pdf1.alldatasheet.net/datasheet-pdf/view/158787/CMEDIA/CM106-L+.html)
>> >> on page 21.
>> >> The key is to set b15 in register 0x02 so that we can get the output.
>> >>
>> >> Hope that helps,
>> >> ---Dan
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>> >> is a gathering of tech-side developers & brand creativity
>> >> professionals. Meet
>> >> the minds behind Google Creative Lab, Visual Complexity, Processing, &
>> >> iPhoneDevCamp asthey present alongside digital heavyweights like
>> >> Barbarian
>> >> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
>> >> _______________________________________________
>> >> Alsa-user mailing list
>> >> Alsa-user@xxxxxxxxxxxxxxxxxxxxx
>> >> https://lists.sourceforge.net/lists/listinfo/alsa-user
>> >>
>> >
>
>

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux