Page 1 of 2 12 LastLast
Results 1 to 10 of 13

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

  1. #1
    Join Date
    Dec 2008
    Beans
    16

    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?

    Please let me know if you need additional information.

    Thanks,
    -J

  2. #2
    Join Date
    Feb 2008
    Beans
    4,232
    Distro
    Ubuntu 12.04 Precise Pangolin

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

    It took me 30 seconds to find this patch by using Google:
    http://tomoyo.sourceforge.jp/cgi-bin...patch_cirrus.c

    It never hurts to mention what operating system you are using. Apparently Lubuntu, but what version?

  3. #3
    Join Date
    Dec 2008
    Beans
    16

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

    I'm using Lubuntu 12.04, Mac 64 bit.

    Re: Ubuntu 12.04 on imac 2011, no headphone sound,

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

    Let me know what you think.

  4. #4
    Join Date
    Feb 2008
    Beans
    4,232
    Distro
    Ubuntu 12.04 Precise Pangolin

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

    Ubuntu does not include kernel source code, so there is no reason you would have that C program on your system.

    If I were you, I would Google other things to try in "model=imac...." unless you are sure your imac is a "27_122" I would certainly try the simple case: model=imac

    To further identify your hardware, open Terminal and run this command:
    sudo lshw -html > Desktop/config.htm

    This should place a file on your desktop; double-click on it to open it in your browser. Search for "Audio device" and "product" might give you something new to plug into Google.
    Last edited by gordintoronto; June 22nd, 2012 at 09:30 PM.

  5. #5
    Join Date
    Dec 2008
    Beans
    16

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

    I have a solution that works good enough for me. This is what I did:

    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.

    Thanks for everybody's help!
    Cheers,
    benzo

  6. #6
    Join Date
    Nov 2008
    Beans
    2

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

    That worked for me, thanks a lot.

    I'm wondering how you found the solution.


    Quote Originally Posted by benzodiaz View Post
    I have a solution that works good enough for me. This is what I did:

    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.

    Thanks for everybody's help!
    Cheers,
    benzo

  7. #7
    Join Date
    May 2012
    Beans
    86
    Distro
    Lubuntu 13.04 Raring Ringtail

    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.
    Last edited by Lunarts; June 29th, 2012 at 01:31 AM.

  8. #8
    Join Date
    Nov 2012
    Beans
    3

    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)

    ~$ sudo python run.py
    Using temporary directory: /dev/shm/hda-analyzer
    You may remove this directory when finished or if you like to
    download the most recent copy of hda-analyzer tool.
    Downloading file hda_analyzer.py
    Downloading file hda_guilib.py
    Downloading file hda_codec.py
    Downloading file hda_proc.py
    Downloading file hda_graph.py
    Downloading file hda_mixer.py
    Downloaded all files, executing hda_analyzer.py
    Traceback (most recent call last):
    File "/dev/shm/hda-analyzer/hda_analyzer.py", line 546, in <module>
    sys.exit(main(sys.argv))
    File "/dev/shm/hda-analyzer/hda_analyzer.py", line 523, in main
    if read_nodes(sys.argv[1:]) == 0:
    File "/dev/shm/hda-analyzer/hda_analyzer.py", line 89, in read_nodes
    read_nodes2(c.card, i)
    File "/dev/shm/hda-analyzer/hda_analyzer.py", line 60, in read_nodes2
    c = HDACodec(card, codec)
    File "/run/shm/hda-analyzer/hda_codec.py", line 1036, in __init__
    self.parse_proc()
    File "/run/shm/hda-analyzer/hda_codec.py", line 1135, in parse_proc
    self.proc_codec = HDACodecProc(self.card, self.device, file)
    File "/run/shm/hda-analyzer/hda_proc.py", line 478, in __init__
    self.parse(proc_file)
    File "/run/shm/hda-analyzer/hda_proc.py", line 672, in parse
    node.add_digital(line[11:])
    File "/run/shm/hda-analyzer/hda_proc.py", line 295, in add_digital
    self.wrongfile('unknown dig1 bit %s' % repr(b))
    File "/run/shm/hda-analyzer/hda_proc.py", line 143, in wrongfile
    raise ValueError, "wrong proc file format (%s)" % msg
    ValueError: wrong proc file format (unknown dig1 bit 'Non-Copyright')
    Any help would be appreciated.

  9. #9
    Join Date
    Dec 2008
    Beans
    16

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

    Hmm. I get the same error. Seems like now we have a problem with HDA Analyzer?

    Anyone have a suggestion?

  10. #10
    Join Date
    Nov 2012
    Beans
    3

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

    Now in short - who has ubuntu 12.04 running on an iMac won't be able to connect headphones or any sound system.1

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •