Re: USB audio adapters (CM6206 chip)

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

 



Good news!!!

aplay -D iec958 SURROUNDTEST_DD_640.wav is playing Doubly Digital to
my receiver and is working!

The file is a 16bit / 44100Khz audio test, the Dolby Digital and all
speakers works!

Mplayer plays fine too, the problem is when I try to play a movie, the
ac3 is 48000Khz, and maybe is not 16bit? How I can see or change to
16bit/44100?

Still got problems with any gstreamer sound. I'll try to play with
asound.conf...

Got the sample from http://www.sr.se/cgi-bin/mall/index.asp?programID=2445
___________________
Fabrício Nihues



2009/5/25 Fabrício Nihues <fabricio.nihues@xxxxxxxxx>:
> Hello Dan!
>
> Now it's working! Sound is comming to my receiver via optical!! I've
> tested only 5min now, just got some problems I'm trying to solve.
>
> 1) Any gstreamer application send sound with wrong sampling rate (Same
> as audacious ressampling to 48khz, but gstremer seems to ressample to
> 48khz even 44.1khz music, tested with Totem), so i'm looking a way to
> send only 44.1khz.
>
> 2) Audacious is perfect.
>
> 3) Couldn't send Mplayer ac3 passtrough, I'm trying to send via Totem
> (or other command to mplayer), working on it....
>
> Update: Just got sound via mplayer, but the passtrough is the same
> garbled sound as in windows with 32/24bit enabled).  Anyone know how
> to send only 16bit stream passtrough via mplayer/alsa? Or any idea how
> to solve? Must there be a way... we are so close to make this thing
> 100% working, it will be the best low price external sound card with
> spdif for linux!
>
> ___________________
> Fabrício Nihues
>
>
>
> 2009/5/25 Dan Allongo <gongo2k1@xxxxxxxxx>:
>> I did some more USB packet sniffing and discovered that the drivers are
>> setting 2 extra undocumented registers and some unknown bits in the existing
>> registers.
>> Try this out and let me know how it goes.
>> I'm trying not to post all of this code to the list immediately in order to
>> avoid confusion.
>> If this works out, then I'll have to split off the boot quirk for this into
>> a separate function due to the extra registers that CM6206 has.
>> All I can say is that after these changes the analog channels still
>> function.
>> Honestly, I don't know that I can do too much more on this because I'm
>> working on the assumption that the driver detects and properly handles the
>> SPDIF device on this chip, which after looking at the code a little more,
>> I'm not sure that it actually does...
>> My coding skills are not strong enough to write that sort of code,
>> especially since I don't actually have any background in audio sub-systems.
>> I guess I just got lucky on this one with the registers being easy enough to
>> identify.
>>
>> static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
>> {
>>     /*
>>      * Set registers to defaults:
>>      * Clear SPDIF-out parameters
>>      * Enable DACx2, PLL binary, Soft Mute, and SPDIF-out
>>      * Enable line-out driver mode, set headphone source to front
>>      * channels, enable stereo mic.
>>      * Enable all channels and select 48-pin chipset
>>      */
>>     return snd_usb_cm106_write_int_reg(dev, 0, 0x200c) +
>>         snd_usb_cm106_write_int_reg(dev, 1, 0x3000) +
>>         snd_usb_cm106_write_int_reg(dev, 2, 0xf800) +
>>         snd_usb_cm106_write_int_reg(dev, 3, 0x143f) +
>>         snd_usb_cm106_write_int_reg(dev, 4, 0x0000) +
>>         snd_usb_cm106_write_int_reg(dev, 5, 0x3000);
>> }
>>
>>
>> Thanks for helping out with this, it's really great that you're able to give
>> me feedback very quickly.
>> ---Dan
>>
>>
>>
>> On Sun, May 24, 2009 at 3:30 PM, Fabrício Nihues <fabricio.nihues@xxxxxxxxx>
>> wrote:
>>>
>>> Hello, I've tried again on windows, and spdif passtrough is working
>>> with dts/ac3 files if you send it as 16 bit output, if sending as 24
>>> bit or 32 bit I get noise, but the passtrough is working all the 5.1
>>> channels, the receiver recognize dts and ac3 even if the analog out is
>>> set to 2 Ch on the driver control panel. The only thing that enable or
>>> disables the optical out is that switch in the cmedia control panel
>>> inside windows.
>>>
>>> If is there something I can do please tell, I'll try to do, I can only
>>> test tomorrow.
>>>
>>> ___________________
>>> Fabrício Nihues
>>>
>>>
>>>
>>> 2009/5/24 Dan Allongo <gongo2k1@xxxxxxxxx>:
>>> > Okay, well, if SPDIF out didn't work with the settings I sent out, then
>>> > I
>>> > really don't know what else to do for it since I'm only stabbing in the
>>> > dark
>>> > here.
>>> > Besides, everything I'm reading seems to imply that the optical out is
>>> > only
>>> > 2-channel stereo anyway on most of these "budget" chips and they only do
>>> > surround sound in analog.
>>> >
>>> > Surround 5.1 does indeed swap cen/lfe with rear outputs, but switching
>>> > to
>>> > surround 4.0 properly down-mixes to rear channels (and being that I only
>>> > have a 4.0 system at home, this works for me).
>>> > Before I submit a patch for this, I'll need someone with a CM106
>>> > TurtleBeach
>>> > device to check that everything still works okay.
>>> > I'm setting the registers to default for a 7.1 card using the 48-pin
>>> > chip as
>>> > per the datasheet with the only deviation of turning on the Line Out
>>> > driver
>>> > as well (which was already there in the existing "quirk" for the CM106).
>>> > Once I get some feedback from CM106 users, I'll submit the patch.
>>> >
>>> >
>>> > --- usbaudio.c    2009-05-06 03:06:04.000000000 -0400
>>> > +++ usbaudio.c    2009-05-24 11:07:44.000000000 -0400
>>> > @@ -3273,10 +3273,17 @@
>>> >  static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
>>> >  {
>>> >      /*
>>> > +     * Set registers to defaults:
>>> > +     * Clear SPDIF-out parameters
>>> > +     * Enable DACx2, PLL binary, Soft Mute, and SPDIF-out
>>> >       * Enable line-out driver mode, set headphone source to front
>>> >       * channels, enable stereo mic.
>>> > +     * Enable all channels and select 48-pin chipset
>>> >       */
>>> > -    return snd_usb_cm106_write_int_reg(dev, 2, 0x8004);
>>> > +    return snd_usb_cm106_write_int_reg(dev, 0, 0x0000) +
>>> > +        snd_usb_cm106_write_int_reg(dev, 1, 0xb000) +
>>> > +        snd_usb_cm106_write_int_reg(dev, 2, 0x8004) +
>>> > +        snd_usb_cm106_write_int_reg(dev, 3, 0x007f);
>>> >  }
>>> >
>>> >
>>> > @@ -3560,7 +3567,8 @@
>>> >      }
>>> >
>>> >      /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */
>>> > -    if (id == USB_ID(0x10f5, 0x0200)) {
>>> > +    /* C-Media CM6206 / CM106-Like Sound Device */
>>> > +    if (id == USB_ID(0x10f5, 0x0200) || id == USB_ID(0x0d8c, 0x0102)) {
>>> >          if (snd_usb_cm106_boot_quirk(dev) < 0)
>>> >              goto __err_val;
>>> >      }
>>> >
>>> >
>>> >
>>> >
>>> > On Sat, May 23, 2009 at 10:52 AM, Paolo Saggese <pmsa4-alsa@xxxxxxxx>
>>> > wrote:
>>> >>
>>> >> On Saturday 23 May 2009, Fabrício Nihues wrote:
>>> >>
>>> >> > 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
>>> >>
>>> >> try plughw:0,1 as the spdif out device.
>>> >>
>>> >> Also experiment with settings on alsamixer.
>>> >>
>>> >> Ciao,
>>> >>                                Paolo.
>>> >>
>>> >> --
>>> >> Skype: Paolo.Saggese
>>> >> http://borex.lngs.infn.it/saggese
>>> >> You can still escape from the GATES of hell: Use Linux!
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> 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
>>> >
>>> >
>>
>>
>

------------------------------------------------------------------------------
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