Re: HDA sound driver mod for sigmatel 92xx

Eric Anderson <[email protected]>
Newsgroups gmane.os.freebsd.devel.multimedia,gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
On 07/13/06 05:05, Boris Samorodov wrote:
> On Wed, 12 Jul 2006 22:34:05 -0500 Eric Anderson wrote:
> 
>> On 07/12/06 20:46, Wesley Morgan wrote:
>>> On Wed, 12 Jul 2006, Eric Anderson wrote:
>>>
>>>> On 07/12/06 20:04, Wesley Morgan wrote:
>>>>> On Wed, 12 Jul 2006, Eric Anderson wrote:
>>>>>
>>>>>> On 07/09/06 09:11, Wesley Morgan wrote:
>>>>>>> With a little help from the netbsd azalia driver (a wonderful
>>>>>>> piece of work, by the way) and the hda specs, I've been able to
>>>>>>> get Andrea's hdac code to work with my laptop. I believe the
>>>>>>> problem was that the codec and dac started out in some kind of
>>>>>>> low-power mode and needed to be woken up before they would work.
>>>>>>>
>>>>>>> Hopefully someone is still working on a proper driver, but for
>>>>>>> now, I can watch movies again!
>>>>>>>
>>>>>>> A diff against Andrea's work is attached.
>>>>>>
>>>>>> I couldn't get this patch to work - all hunks fail.  What am I
>>>>>> doing wrong?
>>>>> Make sure your mailer didn't wrap long lines? It applies cleanly
>>>>> for me. I've attached a newer diff that makes the mixer work
>>>>> properly as well, but it's hard-coded to the correct widget for me
>>>>> so it might not work for everyone.
>>>> Well, it must be my hdac.tgz then, because the attached patch looks
>>>> fine, but still fails poorly.  Maybe a pointer to the hdac.tgz you
>>>> used, and an md5 sum would do the trick..
>>> The original hdac.tgz posted by Andrea, I believe can be found at:
>>>
>>> http://darkircop.org/hdac.tgz
>>>
>>>
> 
>> [root@neutrino /tmp/freebsd]# fetch http://darkircop.org/hdac.tgz
>> hdac.tgz                                      100% of  122 kB  151 kBps
>> [root@neutrino /tmp/freebsd]# tar xvzf hdac.tgz
>> x hdac
>> x hdac/hdac.c
>> x hdac/hdac_reg.h
>> x hdac/hdac.h
>> x hdac/hda_reg.h
>> x hdac/hdac_private.h
>> x hdac/Makefile
>> x hdac/hdac.z~
>> x hdac/calc.core
>> x hdac/hdac.y~
>> x hdac/hdac.c~
>> x hdac/hdac.c.bak
>> x hdac/.hda_reg.h.swp
>> [root@neutrino /tmp/freebsd]# cd hdac
>> [root@neutrino /tmp/freebsd/hdac]# patch < ../hdac.diff
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --------------------------
>> |diff -urb hdac/hdac.c hdac-sigma/hdac.c
>> |--- hdac/hdac.c        Mon Jun  5 15:15:12 2006
>> |+++ hdac-sigma/hdac.c  Wed Jul 12 21:02:32 2006
>> --------------------------
>> Patching file hdac.c using Plan A...
>> Hunk #1 failed at 247.
>> Hunk #2 failed at 261.
>> Hunk #3 succeeded at 1879 with fuzz 2 (offset 1605 lines).
>> Hunk #4 failed at 2396.
>> Hunk #5 failed at 2430.
>> Hunk #6 failed at 2472.
>> Hunk #7 failed at 2517.
>> Hunk #8 failed at 2568.
>> Hunk #9 failed at 2597.
>> Hunk #10 failed at 2893.
>> Hunk #11 failed at 3233.
>> 10 out of 11 hunks failed--saving rejects to hdac.c.rej
>> done
>> [root@neutrino /tmp/freebsd/hdac]#
> 
> Just in case: make sure you don't have CRLFs at line endings of your
> patch.
> 
> 
> WBR


*sigh* - that was it.  How's they get introduced?  My mailer didn't do 
it (I just checked).  Must have been on the sending side?

Painful.

Only one hunk failed that way:

[root@neutrino /tmp/freebsd]# tar xvzf hdac.tgz
x hdac
x hdac/hdac.c
x hdac/hdac_reg.h
x hdac/hdac.h
x hdac/hda_reg.h
x hdac/hdac_private.h
x hdac/Makefile
x hdac/hdac.z~
x hdac/calc.core
x hdac/hdac.y~
x hdac/hdac.c~
x hdac/hdac.c.bak
x hdac/.hda_reg.h.swp
[root@neutrino /tmp/freebsd]# cd hdac
[root@neutrino /tmp/freebsd/hdac]# patch <../hdac-sigma2.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -urb hdac/hdac.c hdac-sigma/hdac.c
|--- hdac/hdac.c        Mon Jun  5 15:15:12 2006
|+++ hdac-sigma/hdac.c  Wed Jul 12 21:02:32 2006
--------------------------
Patching file hdac.c using Plan A...
Hunk #1 succeeded at 247.
Hunk #2 succeeded at 261.
Hunk #3 succeeded at 274.
Hunk #4 failed at 791.
Hunk #5 succeeded at 825.
Hunk #6 succeeded at 867.
Hunk #7 succeeded at 912.
Hunk #8 succeeded at 963.
Hunk #9 succeeded at 992.
Hunk #10 succeeded at 1288.
Hunk #11 succeeded at 1628.
1 out of 11 hunks failed--saving rejects to hdac.c.rej
done
[root@neutrino /tmp/freebsd/hdac]# cat hdac.c.rej
***************
*** 786,791 ****
         devinfo->stepping_id = 
HDA_PARAM_REVISION_ID_STEPPING_ID(revisionid);
         devinfo->node_type = HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE(fctgrptype);

         hdac_add_child(sc, devinfo);
   }

--- 791,800 ----
         devinfo->stepping_id = 
HDA_PARAM_REVISION_ID_STEPPING_ID(revisionid);
         devinfo->node_type = HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE(fctgrptype);

+
+       device_printf(sc->dev, "Vendor info: %x %x %x %x %x %x\n", 
vendorid, devinfo->vendor_id, devinfo->device_id,
+               devinfo->revision_id, devinfo->stepping_id, 
devinfo->node_type);
+
         hdac_add_child(sc, devinfo);
   }



After manually applying the patch, it builds, and makes my sound work 
fine!!!!!!

Woohoo!!

Thanks to those who made this work!

Eric


-- 
------------------------------------------------------------------------
Eric Anderson        Sr. Systems Administrator        Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.