Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Updating wm8753 codec
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Circuits
n00b
n00b


Joined: 16 Oct 2018
Posts: 6

PostPosted: Tue Oct 16, 2018 8:23 pm    Post subject: Updating wm8753 codec Reply with quote

I am new to these forums but by chance I stumbled across this thread: https://forums.gentoo.org/viewtopic-t-842411-start-50.html while searching for solutions to my problem. Let it be known that I am more of a software guy than a hardware guy but as fate would have it my first hardware experience is updating an EOL codec with one that is still in production. Essentially, I am working on a legacy kernel (2.6.35.14) with legacy systems and I am rather new to Linux in general so it has been a double struggle for me to get this far. Specifically, one of our legacy products audio codec is no longer sold but the product itself is still being sold. So the hardware boys decided to replace the EOL codec () with the codec and its up to me to get it working.

After some time an effort (never configured a Linux kernel before) I have figured out how to get my wm8750 configured s/t the kernel see's it. I have also started messing around with the old machine or "glue" driver for the EOL codec in an attempt to make it work for the new codec. I think I have it but apparently not?? After making changes to the machine driver and building the kernel I tried booting up the system and I logged the process. I am getting the following error in my log:

Hardware is initialized using a guess method
alsactl: set_control:1255: failed to obtain info for control #2 (No such file or directory)
alsactl: set_control:1255: failed to obtain info for control #6 (No such file or directory)
alsactl: set_control:1255: failed to obtain info for control #7 (No such file or directory)

it goes on attempting this set_control quite a few more times.

So does this mean my machine driver is built incorrectly or is there something else that I need to do in order to get the wm8750 hardware initialized properly? I realize this could require more information so if that is the case please feel free to ask. I could post datasheets, circuit diagrams, code, pictures of the configuration (menuconfig)... you name it.


Last edited by Circuits on Thu Oct 25, 2018 5:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 16, 2018 8:46 pm    Post subject: Reply with quote

Welcome to the forums.

Myself and probably other members here are not familiar with this hardware. So the first question is how it is connected? PCI, USB, something else?
Please note, these forums do not allow long logs, if you wish to share logs or kernel config with us please use some pastebin site. Gentoo has wgetpaste utility for this, not sure if you have this at your disposal.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Circuits
n00b
n00b


Joined: 16 Oct 2018
Posts: 6

PostPosted: Tue Oct 16, 2018 9:10 pm    Post subject: Reply with quote

@Jaglover This is embedded Linux ALSA SoC for an i.MX CCWMX51 board.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 16, 2018 9:25 pm    Post subject: Reply with quote

Generally, if the ALSA device driver is loaded you will get nodes in /dev/snd and all applications can use them. Unless there is some permission issue. OTOH, this is a very old kernel version and apparently you are using some embedded Linux? I don't think I can be much help here. :(
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Oct 16, 2018 9:46 pm    Post subject: Reply with quote

Moved from Kernel & Hardware to Unsupported Software. Not about Gentoo so it fits better here.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Circuits
n00b
n00b


Joined: 16 Oct 2018
Posts: 6

PostPosted: Tue Oct 16, 2018 9:47 pm    Post subject: Reply with quote

@John R. Graham Ah I see sorry about that.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Oct 16, 2018 9:50 pm    Post subject: Reply with quote

No worries. Also, "Unsupported Software" is, in fact, a support forum. ;)

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Oct 16, 2018 11:43 pm    Post subject: Re: Updating wm8753 codec Reply with quote

Circuits wrote:
Code:
alsactl: set_control:1255: failed to obtain info for control #2 (No such file or directory)
alsactl: set_control:1255: failed to obtain info for control #6 (No such file or directory)
alsactl: set_control:1255: failed to obtain info for control #7 (No such file or directory)

Circuits ... this error is generally the result of having a 'state' file that doesn't match, or nolonger matches, the hardware. I suspect you have a /var/lib/alsa/asound.state in your image left over from your previous driver. You can delete this, which should hopefully resolve the above errors.

best ... khay
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Wed Oct 17, 2018 1:38 am    Post subject: Reply with quote

I suspect the answer will be that you have a good reason not to upgrade, but on the off chance that you can, I strongly encourage you to try a more recent kernel. It may not be relevant to your immediate problem, but it is a good idea in principle. You may also find more people knowledgeable about the relevant subsystems in a contemporary kernel than knowledgeable about an old and mostly abandoned kernel.
Back to top
View user's profile Send private message
Circuits
n00b
n00b


Joined: 16 Oct 2018
Posts: 6

PostPosted: Fri Oct 19, 2018 4:58 pm    Post subject: Re: Updating wm8753 codec Reply with quote

khayyam wrote:
Circuits wrote:
Code:
alsactl: set_control:1255: failed to obtain info for control #2 (No such file or directory)
alsactl: set_control:1255: failed to obtain info for control #6 (No such file or directory)
alsactl: set_control:1255: failed to obtain info for control #7 (No such file or directory)

Circuits ... this error is generally the result of having a 'state' file that doesn't match, or nolonger matches, the hardware. I suspect you have a /var/lib/alsa/asound.state in your image left over from your previous driver. You can delete this, which should hopefully resolve the above errors.

best ... khay


Unfortunately, I could not find any .state files. The odd part is that all the buss lines are the same between the two codecs. So are the output lines so I dont understand why it wouldn't be able to initialize the hardware. Is there some way for me to ping the hardware? For instance, if I stop the boot-up process of U-boot can I type in some command that will ping the new codec? Obviously, it see's the dang thing so I dont know if that will help me but.. kinda stuck here.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Oct 20, 2018 11:22 am    Post subject: Re: Updating wm8753 codec Reply with quote

Circuits wrote:
Unfortunately, I could not find any .state files. The odd part is that all the buss lines are the same between the two codecs. So are the output lines so I dont understand why it wouldn't be able to initialize the hardware. Is there some way for me to ping the hardware? For instance, if I stop the boot-up process of U-boot can I type in some command that will ping the new codec? Obviously, it see's the dang thing so I dont know if that will help me but.. kinda stuck here.

Circuits ... "ping" what? ... the kernel is the mechanism that drives it, and so if it doesn't know about this specific hardware then it's not going to be able to communicate with it (except perhaps to return some error). Anyhow, I should have paid closer to attention to what came before:

Code:
Unknown hardware: "WM8750" "" "" "" ""

That shows the wm8750 driver doesn't know about your specific device, there is no device tree providing the driver with the information needed, so it trys (and fails) to "guess". The errors that follow are the result. The most obvious solution is to look at the driver in a more recent kernel (or, as Hu suggesed, update to same), and attempt to backport these into 2.6.35.14. Its beyond my skill, but others have done similar with wm8750 for Raspberry Pi, and so that link (and links within) should provide some idea of what's required.

Currently I'm in the process of packing for a move next week, and will be offline for a while after that, so I'm not going to be able to help here ... sorry.

best ... khay
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Oct 20, 2018 1:58 pm    Post subject: Reply with quote

I did a little reading, the whole ALSA SoC seems a little messy hardware-wise.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Circuits
n00b
n00b


Joined: 16 Oct 2018
Posts: 6

PostPosted: Mon Oct 22, 2018 4:45 pm    Post subject: Reply with quote

Well I am not an EE but I was looking at the Datasheet for the wm8750. There is a diagram in there that shows 5 pins being hooked up between the codec and the bus. However, the boys in hardware drove one of those connections to ground.
Unfortunately, this kernel was customized by Digi and updating it would apparently be too hard to do so that is why it has not been updated.


Last edited by Circuits on Thu Oct 25, 2018 5:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Mon Oct 22, 2018 4:58 pm    Post subject: Reply with quote

Look here: https://elixir.bootlin.com/linux/latest/source/sound/soc/codecs/wm8753.c

^^ This is the latest.

And this is yours: https://elixir.bootlin.com/linux/v2.6.35.14/source/sound/soc/codecs/wm8753.c

You may get away just by editing the source and adding the identifier of your version of WM8753.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Circuits
n00b
n00b


Joined: 16 Oct 2018
Posts: 6

PostPosted: Mon Oct 22, 2018 5:24 pm    Post subject: Reply with quote

Maybe I haven't been clear on what I a have done and what I need to do (not supersizing) considering it's all a bit foggy for me. I am trying to update the codec to a codec (53 to 50). Both codecs are part of the kernel so I did not have to add the 50 it was already there. What I did was configured the kernel s/t it no longer looked for the instead it looked for the 50. Then what I did was edit the old machine driver for the 53 in an attempt to convert it s/t it would work for the 50 codec. I haven't actual touched the codec at all as the philosophy (from what I understand) behind the ASoC system was to: change the machine driver and not the codec. I must have made those configuration adjustments correctly because during the boot process it's not looking for a its looking (correctly) for the 50. Why it can't find it... I am not sure.

@Jaglover I hope this makes it more clear what I am trying to do? So touching the codec won't be necessary for me. Unless... are you suggesting that the codec for the code that I have in my kernel isn't going to work becasue the hardware we purchased actually needs to operate on a newer updated version for the code and not the code that was already in the kernel?


Last edited by Circuits on Thu Oct 25, 2018 5:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Mon Oct 22, 2018 10:00 pm    Post subject: Reply with quote

Yeah, my bad. This thread has been going on for some time now, I forgot how it started. Anyhow, to get the driver load it needs to identify the piece of hardware. For PCI devices it is the PCI ID, for instance.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum