No headphone sound; iMac 21.5", 12,1; patch_cirrus.c; imac27_122

Hi,

The title says most of the issue, but the critical issue is that I don't know why I can't find patch_cirrus.c. I was trying to solve the problem with Lunarts and friends, but what worked for them didn't work for me; i.e., adding the line:
options snd-hda-intel model=imac27_122,
to /etc/modprobe.p/alsa-base.conf, then, restarting the computer.

Does Lubuntu not have the file patch_cirrus.c?
How does it build the list of alsa options?

Re: No headphone sound; iMac 21.5", 12,1; patch_cirrus.c; imac27_122

that issue was solved. However, the solution doesn't work for my system and the only difference is that I am using Lubuntu, while Lunarts is using Ubuntu. The solution was as follows:

There is no need to apply the patch above, because it is already there on your ubuntu, my procedure:

1 - By logic recognized which the lines in green mean the extra fix lines of the patch

2 - using gksudo nautilus, then nautilus search feature, located the patch_cirrus.c and entered there with full write privileges(due to gksudo)

3 - using gedit search feature discovered which one of the patch green lines was already there.

After some additional thinking I noticed which one of the patch lines is close to other lines whose content are exactly used on /etc/modprobe.d/alsa-base.conf to solve such kind of problems. The alsa list of supported models for the cirrus codec is not updated yet to include that(not sure if it will); no matter if you get the list from your own ubuntu or from the internet. There was no way to know this model existed without benzodiaz help.

So, open your terminal and:

1 - sudo gedit /etc/modprobe.d/alsa-base.conf

2 - add to end of the file "options snd-hda-intel model=imac27_122"(only the stuff inside the quotes), save and reboot.

This worked for me, the only fix from several and several others I tried. What a pleasant surprise, the fix was already there since this year january, it was only hidden.

PS: Thanks a lot for the tip benzodias

Re: the fact that the file patch_cirrus.c has already been applied in the 3.2.0-25-generic kernel for Ubuntu, says that we can add the mac27_122 option and we have a solution.

My filesystem doesn't contain the file patch_cirrus.c, which seems to build the alsa driver database in some way...

Re: No headphone sound; iMac 21.5", 12,1; patch_cirrus.c; imac27_122

1. In a terminal, paste the line in the quotations, "sudo wget -O run.py http://www.alsa-project.org/hda-analyzer.py"

2. Then paste this, "sudo python run.py", and it will open what's called HDA Analyzer.

3. Click codec-0 on the left hand side, under Nodes. Where it says GPIO, uncheck out-dir, enable, and data for the row [1], and check them for row [2]. If you had your headphones on when you checked data [2], you should get output.

4. At the bottom, click Exp., save as, and save it in your home directory.

5. Open gedit and type, "gksu python /path/to/previously/saved/file" and save it in your home directory. Go to the gedit file you just made, right click and go to properties, click the permissions tab, and check make this file executable.

7. Whenever your headphones don't work and they should, open a terminal, Ctrl+Alt+t, and type the name of the gedit file you created. This reloads the settings you made in hda analyzer.

Re: No headphone sound; iMac 21.5", 12,1; patch_cirrus.c; imac27_122

1. In a terminal, paste the line in the quotations, "sudo wget -O run.py http://www.alsa-project.org/hda-analyzer.py"

2. Then paste this, "sudo python run.py", and it will open what's called HDA Analyzer.

3. Click codec-0 on the left hand side, under Nodes. Where it says GPIO, uncheck out-dir, enable, and data for the row [1], and check them for row [2]. If you had your headphones on when you checked data [2], you should get output.

4. At the bottom, click Exp., save as, and save it in your home directory.

5. Open gedit and type, "gksu python /path/to/previously/saved/file" and save it in your home directory. Go to the gedit file you just made, right click and go to properties, click the permissions tab, and check make this file executable.

7. Whenever your headphones don't work and they should, open a terminal, Ctrl+Alt+t, and type the name of the gedit file you created. This reloads the settings you made in hda analyzer.

Re: No headphone sound; iMac 21.5", 12,1; patch_cirrus.c; imac27_122

Glad you had found a solution, I have been busy with some things and when I came back to check your issue, it was already solved.

patch_cirrus.c included in ubuntu did exactly what you had done but in a simpler way(just changing model at alsa-conf was needed). The issue was wrong mapping of where the headphone jack was as said at the page you first presented me before, which solved my problem.

I too had tried HDAnalyser before, thought forgot to mention. It is the tool for the job if everything else fails and you know how to use it.

I got two patch_cirrus.c, one under /usr/src/alsa-hda-0.201206181122~precise1 and other under /var/lib/dkms/alsa-hda/0.201206181122~precise1/build. Maybe by locating these two alsa-hda folders at lubuntu(if any) and inserting a ubuntu patch_cirrus.c copy at each(and using model 27_122) would also had solved your problem, but I´m not sure.

PS1: Patch_cirrus.c do exist in ubuntu(at lubuntu it seems it doesn´t), it was commited long ago.
PS2: The apple model 27_122 does not exist, it is a patch which solves the issues for a 27 imac, thought it also solves it for 21,5 imac as the patch creators mentioned.

Re: No headphone sound; iMac 21.5", 12,1; patch_cirrus.c; imac27_122

Hi all,

this thread solved the problem for me a few months ago. Now after updating ubuntu last week I get an error message. Pending updates had accumulated for maybe two months up to that day, so I can't say which one precisely caused the error. (...which is why updates tend to accumulate in the first place)