#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)); } ass='form'>
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2016-08-04 12:22:32 +0200
committerMark Brown <broonie@kernel.org>2016-08-08 11:54:50 +0100
commit35397edeb14f033e51296400ff31d159dbb8444a (patch)
treee2364537af0e82f72da71fd5f3f6c238eaa5db42 /sound/soc/generic
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
ASoC: dwc: Drop DMA channel names assignment
The dw_configure_dai_by_dt() function and further dev->{play,capture} _dma_data.dt data structures seem to be used in this driver only in case of a system using devicetree, thus chan_name assignments have no effect since they will be ignored in dmaengine_pcm_request_chan_of() call and will be substituted with values taken form dmaengine_pcm_dma_channel_names[] table ("tx", "rx"). Also there is no any "TX", "RX" dma-names entries in arch/arm/boot/dts, only lower case "tx", "rx" seem to be used. Lastly, this driver doesn't set SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag when registering a dmaengine PCM to indicate the chan_name should be used. My intention is to eventually remove the struct snd_dmaengine_dai_dma_data chan_name field as there is also a chan_names[] field in struct snd_dmaengine_pcm_config which can be used for same purpose. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic')