[HTC Droid DNA] drewX2:
I am assuming it was a permissions issue? I am just looking over your code now and I noticed you're missing permissions related to audio, noticed you're using the ueventd.rc I made, so disregard (I just threw everything in it because I got tired of fiddling with with multiple files). I think this confuses a lot of people, but init does not load both QCOM and DLX init files. The purpose of the kernel commandline args is to tell it what the hardware name is. e.g.

BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=dlx user_debug=31

---------- Post added at 01:57 AM ---------- Previous post was at 01:52 AM ----------

Yea thats a PITA. I think it would be easier to modify the cases in the kernel source. its only a few files.

When modifying within android source: libhardware, libhardware_legacy, bionic headers, system/core/include/system contain references for audio.... its much more work...

You're missing the sound headers on CM10DNA. They are seen here: https://github.com/drewx2/android_device_htc_msm8960-common/tree/jellybean/include/sound (q6asm.h prolly isn't important tho)

Lastly, I'm not entirely sure, but I believe the use cases don't really matter so long as the kernel headers are correct. Use the same use cases as whatever alsa or CM is packing and it should be fine. If I remember correctly, the use cases only reference back to an ENUM -> that ENUM references another list of IOCTLS (e.g. asound/compress/etc.) -> which then references back to kernel.

This is from asound.h I am willing to bet this is important as the version included with CM10.1 (and various other devices) do not match (if you look at the kernel header, the IOC specifically dont match up).

CM10.1

#define SNDRV_CTL_IOCTL_PVERSION	_IOR('U', 0x00, int)
#define SNDRV_CTL_IOCTL_CARD_INFO	_IOR('U', 0x01, struct snd_ctl_card_info)
#define SNDRV_CTL_IOCTL_ELEM_LIST	_IOWR('U', 0x10, struct snd_ctl_elem_list)
#define SNDRV_CTL_IOCTL_ELEM_INFO	_IOWR('U', 0x11, struct snd_ctl_elem_info)
#define SNDRV_CTL_IOCTL_ELEM_READ	_IOWR('U', 0x12, struct snd_ctl_elem_value)
#define SNDRV_CTL_IOCTL_ELEM_WRITE	_IOWR('U', 0x13, struct snd_ctl_elem_value)
#define SNDRV_CTL_IOCTL_ELEM_LOCK	_IOW('U', 0x14, struct snd_ctl_elem_id)
#define SNDRV_CTL_IOCTL_ELEM_UNLOCK	_IOW('U', 0x15, struct snd_ctl_elem_id)
#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
#define SNDRV_CTL_IOCTL_ELEM_ADD	_IOWR('U', 0x17, struct snd_ctl_elem_info)
#define SNDRV_CTL_IOCTL_ELEM_REPLACE	_IOWR('U', 0x18, struct snd_ctl_elem_info)
#define SNDRV_CTL_IOCTL_ELEM_REMOVE	_IOWR('U', 0x19, struct snd_ctl_elem_id)
#define SNDRV_CTL_IOCTL_TLV_READ	_IOWR('U', 0x1a, struct snd_ctl_tlv)
#define SNDRV_CTL_IOCTL_TLV_WRITE	_IOWR('U', 0x1b, struct snd_ctl_tlv)
#define SNDRV_CTL_IOCTL_TLV_COMMAND	_IOWR('U', 0x1c, struct snd_ctl_tlv)
#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
#define SNDRV_CTL_IOCTL_HWDEP_INFO	_IOR('U', 0x21, struct snd_hwdep_info)
#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE	_IOR('U', 0x30, int)
#define SNDRV_CTL_IOCTL_PCM_INFO	_IOWR('U', 0x31, struct snd_pcm_info)
#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
#define SNDRV_CTL_IOCTL_RAWMIDI_INFO	_IOWR('U', 0x41, struct snd_rawmidi_info)
#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
#define SNDRV_CTL_IOCTL_POWER	_IOWR('U', 0xd0, int)
#define SNDRV_CTL_IOCTL_POWER_STATE	_IOR('U', 0xd1, int)

DNA

#define SNDRV_PCM_IOCTL_PVERSION	_IOR('A', 0x00, int)
#define SNDRV_PCM_IOCTL_INFO	_IOR('A', 0x01, struct snd_pcm_info)
#define SNDRV_PCM_IOCTL_TSTAMP	_IOW('A', 0x02, int)
#define SNDRV_PCM_IOCTL_TTSTAMP	_IOW('A', 0x03, int)
#define SNDRV_PCM_IOCTL_HW_REFINE	_IOWR('A', 0x10, struct snd_pcm_hw_params)
#define SNDRV_PCM_IOCTL_HW_PARAMS	_IOWR('A', 0x11, struct snd_pcm_hw_params)
#define SNDRV_PCM_IOCTL_HW_FREE	_IO('A', 0x12)
#define SNDRV_PCM_IOCTL_SW_PARAMS	_IOWR('A', 0x13, struct snd_pcm_sw_params)
#define SNDRV_PCM_IOCTL_STATUS	_IOR('A', 0x20, struct snd_pcm_status)
#define SNDRV_PCM_IOCTL_DELAY	_IOR('A', 0x21, snd_pcm_sframes_t)
#define SNDRV_PCM_IOCTL_HWSYNC	_IO('A', 0x22)
#define SNDRV_PCM_IOCTL_SYNC_PTR	_IOWR('A', 0x23, struct snd_pcm_sync_ptr)
#define SNDRV_PCM_IOCTL_CHANNEL_INFO	_IOR('A', 0x32, struct snd_pcm_channel_info)
#define SNDRV_PCM_IOCTL_PREPARE	_IO('A', 0x40)
#define SNDRV_PCM_IOCTL_RESET	_IO('A', 0x41)
#define SNDRV_PCM_IOCTL_START	_IO('A', 0x42)
#define SNDRV_PCM_IOCTL_DROP	_IO('A', 0x43)
#define SNDRV_PCM_IOCTL_DRAIN	_IO('A', 0x44)
#define SNDRV_PCM_IOCTL_PAUSE	_IOW('A', 0x45, int)
#define SNDRV_PCM_IOCTL_REWIND	_IOW('A', 0x46, snd_pcm_uframes_t)
#define SNDRV_PCM_IOCTL_RESUME	_IO('A', 0x47)
#define SNDRV_PCM_IOCTL_XRUN	_IO('A', 0x48)
#define SNDRV_PCM_IOCTL_FORWARD	_IOW('A', 0x49, snd_pcm_uframes_t)
#define SNDRV_PCM_IOCTL_WRITEI_FRAMES	_IOW('A', 0x50, struct snd_xferi)
#define SNDRV_PCM_IOCTL_READI_FRAMES	_IOR('A', 0x51, struct snd_xferi)
#define SNDRV_PCM_IOCTL_WRITEN_FRAMES	_IOW('A', 0x52, struct snd_xfern)
#define SNDRV_PCM_IOCTL_READN_FRAMES	_IOR('A', 0x53, struct snd_xfern)
#define SNDRV_PCM_IOCTL_LINK	_IOW('A', 0x60, int)
#define SNDRV_PCM_IOCTL_UNLINK	_IO('A', 0x61)
#define SNDRV_PCM_IOCTL_ENABLE_EFFECT	_IOW('A', 0x70, int)

There is actually a lot more in that file that don't match up. I just built it with some header mods and sound is working properly, except sound configs need to be modified. Anyhow, you got this. Back into my hole I go.

Here is 4.2.1 CAF of the whole hardware directory just in case: https://github.com/drewx2/android_hardware-caf