#include #include #include #include #include #include #include #include #include "str.h" #include "tstamping.h" int set_sockopt_hwtimestamp(int sock, const char *dev) { int timesource, ret; struct hwtstamp_config hwconfig; struct ifreq ifr; if (!strncmp("any", dev, strlen("any"))) return -1; memset(&hwconfig, 0, sizeof(hwconfig)); hwconfig.tx_type = HWTSTAMP_TX_OFF; hwconfig.rx_filter = HWTSTAMP_FILTER_ALL; memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name)); ifr.ifr_data = &hwconfig; ret = ioctl(sock, SIOCSHWTSTAMP, &ifr); if (ret < 0) return -1; timesource = SOF_TIMESTAMPING_RAW_HARDWARE; return setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, ×ource, sizeof(timesource)); } '> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-11-20 15:37:47 -0200
committerMark Brown <broonie@linaro.org>2013-11-24 13:49:44 +0000
commit5c1537163ce716e317776565b8210ea06fa2b5de (patch)
treef1408f5e270911131f2250d8509ed7e6e2de2fb2 /sound
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
ASoC: wm8728: Use IS_ENABLED() macro
Using the IS_ENABLED() macro can make the code shorter and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')