LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-09-2018, 04:38 PM   #1
vysero
Member
 
Registered: May 2018
Posts: 137

Rep: Reputation: Disabled
Updating a codec?


I need to update a codec for an old kernel; specifically, updating the WM8753 to the WM8750 on kernel-2.6.35.14. The CODEC itself exists in the kernel. Other than adding the new codec into the .config file s/t:

CONFIG_SND_SOC_IMX_CCWMX51_WM8750=y
and
CONFIG_SND_SOC_WM8750=y

what does it take?

The documentation found in the kernel/documentation/sound/alsa/soc directory mentions a: codec, platform and machine driver. However, a simple grep search for "wm8753" reveals that there is more than just 3 .c files referencing the codec. Granted, many of these files will be for different boards mine is an imx51 so I can eliminate most of them. I believe I have found the machine driver: sound/soc/imx/imx-ccwmx51-wm8753.c the rest of the files referencing "wm8753" are located @ arch/arm/mach-mx5 and so I am assuming these are the platform drivers?

What I was hoping was that I could simply change any reference of the wm8753 to wm8750 but most of my experience with hardware was in college on DOS systems using programs like Quartus and languages like VHDL. Actually writing drivers is something I have never done before and I am new to the Linux world as well.

That being said if anyone has any experience with this sort of thing I am all ears and I would be interested to know what you have to say or any advice you might be able to give me!

Last edited by vysero; 10-09-2018 at 04:57 PM.
 
Old 10-10-2018, 11:30 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Where is the new module coming from? Do you simply want to reconfigure the kernel? Do you have the kernel sources installed? This might help, depending on what exactly you're trying to accomplish. https://kerneltweaks.wordpress.com/2...l-source-code/

If you just want to reconfigure the existing kernel to include different parts, switch to the kernel source directory and run 'make menuconfig' as root.

Last edited by AwesomeMachine; 10-10-2018 at 11:32 AM.
 
Old 10-10-2018, 11:50 AM   #3
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
If you just want to reconfigure the existing kernel to include different parts, switch to the kernel source directory and run 'make menuconfig' as root.
This is how I went about getting the new codec to show up in the .config file in the main kernel directory. What I am attempting to do now is make all the necessary changes in the drivers so that this codec can be used.

Maybe I should have mentioned. There was an update in the actual physical codec on the board, along with a new amplifier. I am attempting to get that new hardware working.

EDIT: Essentially, I believe what this boils down to is being able to adapt the old machine driver for the wm8753 to work with the wm8750 but there is no documentation on how to right machine drivers for specific codecs that i can find. So if anyone has ever written a machine driver for a codec then feel free to comment.

Last edited by vysero; 10-10-2018 at 02:35 PM.
 
Old 10-16-2018, 03:03 PM   #4
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Here is the error I am receiving when I boot the kernel:

Unknown hardware: "WM8750" "" "" "" ""
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)
alsactl: set_control:1255: failed to obtain info for control #8 (No such file or directory)...

Anyone have an idea of how I am supposed to initialize this hardware? I figure that is the machine drivers job but I think I have that built correctly so maybe not?
 
Old 10-17-2018, 01:07 AM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Does it boot all the way? Or does that error stop the process? Maybe the module isn't loading.

Last edited by AwesomeMachine; 10-17-2018 at 01:08 AM.
 
Old 10-17-2018, 10:09 AM   #6
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
It does boot all the way. I am under the assumption that it may not actually be loading in my edited version of the kernel:

Code:
** Invalid boot device **

Booting partition 'Kernel0'

## Booting kernel from Legacy Image at 90007fc0 ...

   Image Name:   Linux-2.6.35.14-tjerbmx51_0005+

   Created:      2018-10-16  21:35:37 UTC

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    2533296 Bytes =  2.4 MB

   Load Address: 90008000

   Entry Point:  90008000

   Loading Kernel Image ... OK

OK
I will try booting again with a versioned kernel.
 
Old 10-19-2018, 11:55 AM   #7
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
After versioning my kernel I could tell it was actually using my altered kernel. So I feel like my machine driver is correct and should work. However, I am getting an error in the boot process:

Unknown hardware: "WM8750" "" "" "" ""
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)

I have looked online and have gotten mixed information on how to deal with this error. It was sugjested that I turn off debugging in alsa config:

│ │ [ ] Verbose procfs contents │ │
│ │ [ ] Verbose printk │ │
│ │ [ ] Debug │ │
│ │ [ ] Generic sound devices --->

I did that. It was also suggested that I look for and delete a .state file but my system does not seem to have any .state files in it.
 
Old 11-01-2018, 03:32 PM   #8
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Still failing to get this working. Some of my debugging output:

Code:
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ccwmx51js [ccwmx51js], device 0: WM8750 WM8750-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
So it would seem my card is registering correctly. However, if I plug in one of the devices with the older codec I get:

Code:
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ccwmx51js [ccwmx51js], device 0: WM8750 WM8750-0 HiFi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
I am not sure what the significance of missing the "HiFi-0" is.

Code:
# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=ccwmx51js
    ccwmx51js, 
    Default Audio Device

# alsactl restore
alsactl: load_state:1571: Cannot open /etc/asound.state for reading: no such file or directory
Unknown hardware "WM8750" "" "" ""  ""
Hardware is initialized using a guess method
If I run this same command with an older codec (working hardware) I get the same error:

Code:
# alsactl restore
alsactl: load_state:1571: Cannot open /etc/asound.state for reading: no such file or directory
Unknown hardware "WM8753" "" "" ""  ""
Hardware is initialized using a guess method
I am lost

Last edited by vysero; 11-01-2018 at 03:58 PM.
 
Old 11-02-2018, 02:32 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by vysero View Post
I am lost
maybe you need to re-evaluate your original assumption:
Quote:
Originally Posted by vysero View Post
I need to update a codec for an old kernel
why do you need an old kernel?
why do you need a new codec?
 
1 members found this post helpful.
Old 11-02-2018, 10:18 AM   #10
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
The old kernel was customized by Digi for their SOM which was built on top of the i.MX51 board. The old codec is no longer being produced (EOL) so the new codec is replacing that hardware.
 
Old 11-26-2018, 12:34 PM   #11
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
An update:

I have managed to get the error to change (somewhat). I changed the naming convention in the mach-mx5 directory and the sound/soc/imx directory. Now instead of saying:

Code:
Unknown hardware: "WM8750" "" "" "" ""
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)
alsactl: set_control:1255: failed to obtain info for control #8 (No such file or directory)... (repeats a few more times)
it simply says:

Code:
No state is present for card ccwmx51p51
Unknown hardware: "WM8750" "" "" "" ""
Hardware is initialized using a guess method
No state is present for card ccwmx51p51
Here is some extra info:

Code:
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ccwmx51p51 [ccwmx51p51], device 0: WM8750 WM8750-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
Code:
# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=ccwmx51p51
    ccwmx51p51, 
    Default Audio Device
Code:
# speaker-test

speaker-test 1.0.23

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy..(will continue if not stopped)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu 12.04: Updating via ssh. Dropped connection. Updating locked. How to continue robsbots Linux - General 10 10-02-2014 07:51 PM
rpm changes are not updating immediately and updating after some time. shri_22ram Linux - Newbie 1 05-13-2013 12:50 PM
Updating VMWare After Updating CentOS Linux31 Red Hat 2 09-18-2007 02:49 PM
Codec's.... kmcgavran Linux - Software 3 01-18-2007 08:39 PM
how to install divx codec?where to get codec ginda Linux - Newbie 1 10-22-2004 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration