Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 701323 Details for
Bug 914796
External speaker and headphones on imac 12,1 don't work out of the box
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
a script that activates the headphone/external speaker jack on an iMac running Fedora 18
fixmacsound.py (text/x-python), 1.22 KB, created by
Hugh Caley
on 2013-02-22 19:09:51 UTC
(
hide
)
Description:
a script that activates the headphone/external speaker jack on an iMac running Fedora 18
Filename:
MIME Type:
Creator:
Hugh Caley
Created:
2013-02-22 19:09:51 UTC
Size:
1.22 KB
patch
obsolete
>#!/usr/bin/env python > ># This command fixes the external speakers on the iMacs. ># But if you unplug them and plug them back in, you'll need to run it again! > >import os >import struct >from fcntl import ioctl > >def __ioctl_val(val): > # workaround for OverFlow bug in python 2.4 > if val & 0x80000000: > return -((val^0xffffffff)+1) > return val > >IOCTL_INFO = __ioctl_val(0x80dc4801) >IOCTL_PVERSION = __ioctl_val(0x80044810) >IOCTL_VERB_WRITE = __ioctl_val(0xc0084811) > >def set(nid, verb, param): > verb = (nid << 24) | (verb << 8) | param > res = ioctl(FD, IOCTL_VERB_WRITE, struct.pack('II', verb, 0)) > >FD = os.open("/dev/snd/hwC0D0", os.O_RDONLY) >info = struct.pack('Ii64s80si64s', 0, 0, '', '', 0, '') >res = ioctl(FD, IOCTL_INFO, info) >name = struct.unpack('Ii64s80si64s', res)[3] >if not name.startswith('HDA Codec'): > raise IOError, "unknown HDA hwdep interface" >res = ioctl(FD, IOCTL_PVERSION, struct.pack('I', 0)) >version = struct.unpack('I', res) >if version < 0x00010000: # 1.0.0 > raise IOError, "unknown HDA hwdep version" > ># initialization sequence starts here... > >set(0x01, 0x715, 0x04) # 0x01071504 (SET_GPIO_DATA) >set(0x01, 0x716, 0x0c) # 0x0107160c (SET_GPIO_MASK) >set(0x01, 0x717, 0x0c) # 0x0107170c (SET_GPIO_DIRECTION) > >os.close(FD)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 914796
: 701323